Fixed #30620 -- Made an example of admin-compliant custom user app pep8 compliant.

This commit is contained in:
Nuno 2019-07-08 06:39:28 +01:00 committed by Mariusz Felisiak
parent 53209f7830
commit 34a88b21da
1 changed files with 3 additions and 2 deletions

View File

@ -1162,13 +1162,14 @@ code would be required in the app's ``admin.py`` file::
add_fieldsets = (
(None, {
'classes': ('wide',),
'fields': ('email', 'date_of_birth', 'password1', 'password2')}
),
'fields': ('email', 'date_of_birth', 'password1', 'password2'),
}),
)
search_fields = ('email',)
ordering = ('email',)
filter_horizontal = ()
# Now register the new UserAdmin...
admin.site.register(MyUser, UserAdmin)
# ... and, since we're not using Django's built-in permissions,