2012-07-10 22:18:48 +00:00
|
|
|
from django import forms
|
|
|
|
|
|
|
|
from markitup.widgets import MarkItUpWidget
|
|
|
|
|
|
|
|
from .models import Page
|
|
|
|
|
|
|
|
|
|
|
|
class PageForm(forms.ModelForm):
|
2014-07-30 18:19:26 +00:00
|
|
|
|
2012-07-10 22:18:48 +00:00
|
|
|
class Meta:
|
|
|
|
model = Page
|
|
|
|
fields = ["title", "body", "path"]
|
|
|
|
widgets = {
|
|
|
|
"body": MarkItUpWidget(),
|
|
|
|
"path": forms.HiddenInput(),
|
|
|
|
}
|
2012-10-18 06:43:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
class FileUploadForm(forms.Form):
|
2014-07-30 18:19:26 +00:00
|
|
|
|
2012-10-18 06:43:00 +00:00
|
|
|
file = forms.FileField()
|