diff options
| author | postrational <github@karzyn.com> | 2013-05-19 10:48:30 +0200 |
|---|---|---|
| committer | postrational <github@karzyn.com> | 2013-05-19 10:48:30 +0200 |
| commit | 0b3a6ead88c84aa30f11ad51ad3d89a016f9dd67 (patch) | |
| tree | 4ff01c398496a84b46866107edc46da68efa3d57 /docs | |
| parent | 398841d6d3fce45b21bdfcd8385889098079f84a (diff) | |
refs #20233 - Full custom user model example isn't really full
Addition and fix for custom user model example documentation.
https://code.djangoproject.com/ticket/20233
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 56f3e60350..4b6721ba21 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -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' + |
