django-markupwiki/markupwiki/forms.py
2010-03-30 10:43:30 -04:00

20 lines
570 B
Python

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')))