mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-13 09:32:26 +03:00
parent
9903cb9fcd
commit
cbb3cdb2b1
|
@ -12,8 +12,22 @@ class UserAdmin(auth_admin.UserAdmin):
|
||||||
|
|
||||||
form = UserChangeForm
|
form = UserChangeForm
|
||||||
add_form = UserCreationForm
|
add_form = UserCreationForm
|
||||||
fieldsets = (("User", {"fields": ("name",)}),) + tuple(
|
fieldsets = (
|
||||||
auth_admin.UserAdmin.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"]
|
list_display = ["username", "name", "is_superuser"]
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user