Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 0b3a6ead88c84aa30f11ad51ad3d89a016f9dd67 1 parent 398841d
@postrational postrational authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 docs/topics/auth/customizing.txt
View
6 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'
+
Please sign in to comment.
Something went wrong with that request. Please try again.