Skip to content

Commit

Permalink
Merge pull request #469 from sbeach92/mylsa-admin-panel
Browse files Browse the repository at this point in the history
Make it possible to create new user from django admin panel
  • Loading branch information
olmari authored Feb 25, 2024
2 parents c933db5 + ac51b38 commit 2213ddb
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,39 @@ class CustomUserAdmin(UserAdmin):
{"fields": ("birthday",) + readonly_fields + ("marked_for_deletion_on",)},
),
)

add_fieldsets = (
(
"Data",
{
"classes": ("wide",),
"fields": (
"email",
"first_name",
"last_name",
"nick",
"mxid",
"language",
"municipality",
"is_active",
"is_staff",
"is_superuser",
"phone",
"bank_account",
"password1",
"password2",
),
},
),
(
"Dates",
{
"classes": ("wide",),
"fields": ("birthday",),
},
),
)

inlines = [ServiceSubscriptionInline]

actions = ["mark_for_deletion_on", "mark_for_deletion_off"]
Expand Down

0 comments on commit 2213ddb

Please sign in to comment.