summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid D Lowe <daviddlowe.flimm@gmail.com>2017-03-08 18:14:58 +0100
committerTim Graham <timograham@gmail.com>2017-03-08 12:15:22 -0500
commitc7351eaa926805917cac64946df323483b1accf0 (patch)
tree34c2ab0af459732f27e27c1483b0eb2c7553a22c /docs
parent33d2c53fb150d58fe4b212438050eea28bf4bf6f (diff)
[1.11.x] Fixed #27911 -- Doc'd how to register custom User with admin.
Backport of 9269dec05efae5deb89912a5b9a98ae75acdfff9 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/auth/customizing.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index ff84fad19f..0ca33642c7 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -411,6 +411,14 @@ model, but you'll be able to customize it in the future if the need arises::
Don't forget to point :setting:`AUTH_USER_MODEL` to it. Do this before creating
any migrations or running ``manage.py migrate`` for the first time.
+Also, register the model in the app's ``admin.py``::
+
+ from django.contrib import admin
+ from django.contrib.auth.admin import UserAdmin
+ from .models import User
+
+ admin.site.register(User, UserAdmin)
+
Changing to a custom user model mid-project
-------------------------------------------