Skip to content

Commit

Permalink
add contrib form
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Jan 14, 2025
1 parent 3ea1ea0 commit f3c9c47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apps/users/admin.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from apps.users.forms import UserAdminChangeForm, UserAdminCreationForm
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import decorators, get_user_model
from django.utils.translation import gettext_lazy as _
from unfold.admin import ModelAdmin

User = get_user_model()

Expand All @@ -14,7 +14,7 @@


@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):
class UserAdmin(ModelAdmin):
form = UserAdminChangeForm
add_form = UserAdminCreationForm
fieldsets = (
Expand Down
1 change: 1 addition & 0 deletions src/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
ADMIN_APPS = [
"unfold",
"unfold.contrib.filters",
"unfold.contrib.forms",
"django.contrib.admin",
]

Expand Down

0 comments on commit f3c9c47

Please sign in to comment.