0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Merge pull request #1145 from postrational/ticket_20233

Fixed #20233 - Full custom user model example isn't really full
This commit is contained in:
Andrew Godwin 2013-05-19 02:00:50 -07:00
commit cf56536ac7

View File

@ -1075,7 +1075,6 @@ code would be required in the app's ``admin.py`` file::
(None, {'fields': ('email', 'password')}),
('Personal info', {'fields': ('date_of_birth',)}),
('Permissions', {'fields': ('is_admin',)}),
('Important dates', {'fields': ('last_login',)}),
)
add_fieldsets = (
(None, {
@ -1092,3 +1091,8 @@ code would be required in the app's ``admin.py`` file::
# ... and, since we're not using Django's builtin permissions,
# unregister the Group model from admin.
admin.site.unregister(Group)
Finally specify the custom model as the default user model for your project using the :setting:`AUTH_USER_MODEL` setting in your ``settings.py``::
AUTH_USER_MODEL = 'customauth.MyUser'