mirror of https://github.com/django/django.git
Fixed #30620 -- Made an example of admin-compliant custom user app pep8 compliant.
This commit is contained in:
parent
53209f7830
commit
34a88b21da
|
@ -1162,13 +1162,14 @@ code would be required in the app's ``admin.py`` file::
|
||||||
add_fieldsets = (
|
add_fieldsets = (
|
||||||
(None, {
|
(None, {
|
||||||
'classes': ('wide',),
|
'classes': ('wide',),
|
||||||
'fields': ('email', 'date_of_birth', 'password1', 'password2')}
|
'fields': ('email', 'date_of_birth', 'password1', 'password2'),
|
||||||
),
|
}),
|
||||||
)
|
)
|
||||||
search_fields = ('email',)
|
search_fields = ('email',)
|
||||||
ordering = ('email',)
|
ordering = ('email',)
|
||||||
filter_horizontal = ()
|
filter_horizontal = ()
|
||||||
|
|
||||||
|
|
||||||
# Now register the new UserAdmin...
|
# Now register the new UserAdmin...
|
||||||
admin.site.register(MyUser, UserAdmin)
|
admin.site.register(MyUser, UserAdmin)
|
||||||
# ... and, since we're not using Django's built-in permissions,
|
# ... and, since we're not using Django's built-in permissions,
|
||||||
|
|
Loading…
Reference in New Issue