From 9269dec05efae5deb89912a5b9a98ae75acdfff9 Mon Sep 17 00:00:00 2001 From: David D Lowe Date: Wed, 8 Mar 2017 18:14:58 +0100 Subject: [PATCH] Fixed #27911 -- Doc'd how to register custom User with admin. --- docs/topics/auth/customizing.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index b3c3335a73..d385e50a57 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -406,6 +406,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 -------------------------------------------