mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
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:
@ -11,6 +11,7 @@ from models import CommunityAuthSite
|
||||
class CommunityAuthSiteAdminForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = CommunityAuthSite
|
||||
exclude = ()
|
||||
|
||||
def clean_cryptkey(self):
|
||||
x = None
|
||||
@ -49,4 +50,4 @@ class PGUserAdmin(UserAdmin):
|
||||
|
||||
admin.site.register(CommunityAuthSite, CommunityAuthSiteAdmin)
|
||||
admin.site.unregister(User) # have to unregister default User Admin...
|
||||
admin.site.register(User, PGUserAdmin) # ...in order to add overrides
|
||||
admin.site.register(User, PGUserAdmin) # ...in order to add overrides
|
||||
|
@ -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']):
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user