diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index 64fb792..4271848 100644
a
|
b
|
when creating a user or changing usernames::
|
323 | 323 | If you wish to keep this restriction in the admin, set ``UserAdmin.add_form`` |
324 | 324 | to use this form:: |
325 | 325 | |
326 | | from django.contrib.auth.admin import UserAdmin |
| 326 | from django.contrib.auth.admin import UserAdmin as BaseUserAdmin |
327 | 327 | from django.contrib.auth.models import User |
328 | 328 | |
329 | | class MyUserAdmin(UserAdmin): |
| 329 | class MyUserAdmin(BaseUserAdmin): |
330 | 330 | add_form = MyUserCreationForm |
331 | 331 | |
332 | 332 | admin.site.unregister(User) |
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index 837bbf8..3da3cc6 100644
a
|
b
|
add it to a ``UserAdmin`` class which is registered with the
|
326 | 326 | :class:`~django.contrib.auth.models.User` class:: |
327 | 327 | |
328 | 328 | from django.contrib import admin |
329 | | from django.contrib.auth.admin import UserAdmin |
| 329 | from django.contrib.auth.admin import UserAdmin as BaseUserAdmin |
330 | 330 | from django.contrib.auth.models import User |
331 | 331 | |
332 | 332 | from my_user_profile_app.models import Employee |
… |
… |
add it to a ``UserAdmin`` class which is registered with the
|
339 | 339 | verbose_name_plural = 'employee' |
340 | 340 | |
341 | 341 | # Define a new User admin |
342 | | class UserAdmin(UserAdmin): |
| 342 | class UserAdmin(BaseUserAdmin): |
343 | 343 | inlines = (EmployeeInline, ) |
344 | 344 | |
345 | 345 | # Re-register UserAdmin |
… |
… |
code would be required in the app's ``admin.py`` file::
|
1059 | 1059 | from django import forms |
1060 | 1060 | from django.contrib import admin |
1061 | 1061 | from django.contrib.auth.models import Group |
1062 | | from django.contrib.auth.admin import UserAdmin |
| 1062 | from django.contrib.auth.admin import UserAdmin as BaseUserAdmin |
1063 | 1063 | from django.contrib.auth.forms import ReadOnlyPasswordHashField |
1064 | 1064 | |
1065 | 1065 | from customauth.models import MyUser |
… |
… |
code would be required in the app's ``admin.py`` file::
|
1110 | 1110 | return self.initial["password"] |
1111 | 1111 | |
1112 | 1112 | |
1113 | | class MyUserAdmin(UserAdmin): |
| 1113 | class UserAdmin(BaseUserAdmin): |
1114 | 1114 | # The forms to add and change user instances |
1115 | 1115 | form = UserChangeForm |
1116 | 1116 | add_form = UserCreationForm |
… |
… |
code would be required in the app's ``admin.py`` file::
|
1138 | 1138 | filter_horizontal = () |
1139 | 1139 | |
1140 | 1140 | # Now register the new UserAdmin... |
1141 | | admin.site.register(MyUser, MyUserAdmin) |
| 1141 | admin.site.register(MyUser, UserAdmin) |
1142 | 1142 | # ... and, since we're not using Django's built-in permissions, |
1143 | 1143 | # unregister the Group model from admin. |
1144 | 1144 | admin.site.unregister(Group) |