coding utf-8 from django import forms from django contrib auth models

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!coding=utf-8
from django import forms
from django.contrib.auth.models import User
from forum.models import Forum
from django.conf import settings
class CreateThreadForm(forms.Form):
subject = forms.CharField(u'Тема новой записи')
forum = forms.ChoiceField(u'Раздел форума',
queryset=Forum.objects.exclude(slug__in=[setting.COMMENT_FORUM_SLUG,
settings.BLOG_COMMENT_SLUG]).order_by('pos').all())
message = form.CharField(u'Сообщение', max_length=2048)