In Django 1.6, you must explicitly declare that you want to use all
fields from the model on a ModelForm. Prior to Django 1.6, this was
not necessary.
Fixes the following errors:
ImproperlyConfigured: Creating a ModelForm without either the
'fields' attribute or the 'exclude' attribute is prohibited; form
MembershipAdminForm needs updating.
ImproperlyConfigured: Creating a ModelForm without either the
'fields' attribute or the 'exclude' attribute is prohibited; form
UserProfileAdminForm needs updating.
Signed-off-by: Jason Stephenson <jason@sigio.com>
class Meta:
model = Membership
+ fields = "__all__"
class MembershipAdmin(admin.ModelAdmin):
search_fields = ['user__username', 'group__external_id',
class Meta:
model = UserProfile
+ fields = "__all__"
class UserProfileAdmin(admin.ModelAdmin):
form = UserProfileAdminForm