django-markupwiki/markupwiki/forms.py

20 lines
570 B
Python
Raw Normal View History

2010-03-30 14:43:30 +00:00
from django import forms
from markupwiki.models import Article, ArticleVersion, PUBLIC, PRIVATE
class ArticleForm(forms.ModelForm):
class Meta:
model = ArticleVersion
fields = ['body', 'body_markup_type']
class StaffModerationForm(forms.ModelForm):
class Meta:
model = Article
fields = ['status']
class ModerationForm(forms.ModelForm):
class Meta:
model = Article
fields = ['status']
status = forms.ChoiceField(choices=((PUBLIC, 'Public'),
(PRIVATE, 'Private')))