mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-13 01:22:25 +03:00
parent
9903cb9fcd
commit
cbb3cdb2b1
|
@ -12,8 +12,22 @@ class UserAdmin(auth_admin.UserAdmin):
|
|||
|
||||
form = UserChangeForm
|
||||
add_form = UserCreationForm
|
||||
fieldsets = (("User", {"fields": ("name",)}),) + tuple(
|
||||
auth_admin.UserAdmin.fieldsets
|
||||
fieldsets = (
|
||||
(None, {"fields": ("username", "password")}),
|
||||
(_("Personal info"), {"fields": ("name", "email")}),
|
||||
(
|
||||
_("Permissions"),
|
||||
{
|
||||
"fields": (
|
||||
"is_active",
|
||||
"is_staff",
|
||||
"is_superuser",
|
||||
"groups",
|
||||
"user_permissions",
|
||||
),
|
||||
},
|
||||
),
|
||||
(_("Important dates"), {"fields": ("last_login", "date_joined")}),
|
||||
)
|
||||
list_display = ["username", "name", "is_superuser"]
|
||||
search_fields = ["name"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user