ModelForm now requires either fields or exclude - mentoined in #52 thanks @volksman

This commit is contained in:
Michael Kutý 2015-06-15 16:54:21 +02:00
parent b03803010d
commit 0e97716488

View file

@ -19,6 +19,7 @@ else:
class CodeMirrorTextArea(forms.Textarea):
"""
A custom widget for the CodeMirror browser editor to be used with the
content field of the Template model.
@ -73,8 +74,8 @@ elif settings.DBTEMPLATES_USE_REDACTOR:
TemplateContentTextArea = RedactorEditor
class TemplateAdminForm(forms.ModelForm):
"""
Custom AdminForm to make the content textarea wider.
"""
@ -85,6 +86,7 @@ class TemplateAdminForm(forms.ModelForm):
class Meta:
model = Template
fields = ('name', 'content', 'sites', 'creation_date', 'last_changed')
fields = "__all__"
class TemplateAdmin(TemplateModelAdmin):