Forms must now always specify include or exclude fields

So for those forms that should have everything in them (and we don't
have a lot of those), set exclude=() to remove the error.
This commit is contained in:
Magnus Hagander
2016-04-28 11:33:08 +02:00
parent 350b936e58
commit cd780de8b6
3 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ from models import CommunityAuthSite
class CommunityAuthSiteAdminForm(forms.ModelForm):
class Meta:
model = CommunityAuthSite
exclude = ()
def clean_cryptkey(self):
x = None

View File

@ -33,6 +33,7 @@ duplicate_stackbuilderapp.short_description = "Duplicate application"
class StackBuilderAppAdminForm(forms.ModelForm):
class Meta:
model = StackBuilderApp
exclude = ()
def clean_textid(self):
if not re.match('^[a-z0-9_]*$', self.cleaned_data['textid']):

View File

@ -15,6 +15,7 @@ approve_event.short_description = 'Approve event'
class EventAdminForm(forms.ModelForm):
class Meta:
model = Event
exclude = ()
def clean(self):
cleaned_data = super(EventAdminForm, self).clean()