From 0e97716488690392f95e60efb2a83ebcaf49cc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Kut=C3=BD?= <6du1ro.n@gmail.com> Date: Mon, 15 Jun 2015 16:54:21 +0200 Subject: [PATCH] ModelForm now requires either fields or exclude - mentoined in #52 thanks @volksman --- dbtemplates/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbtemplates/admin.py b/dbtemplates/admin.py index b6063d8..14b35f9 100644 --- a/dbtemplates/admin.py +++ b/dbtemplates/admin.py @@ -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):