Skip to content

Commit

Permalink
reorder member admin fields, close #232
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Feb 24, 2024
1 parent 12fdc59 commit d3c8fa4
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions members/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.http.request import HttpRequest


from django.utils.translation import gettext, gettext_lazy as _
import sepaxml
from django.forms.models import model_to_dict
from django.contrib import admin
Expand Down Expand Up @@ -262,8 +263,22 @@ class Meta(UserCreationForm.Meta):

@admin.register(User)
class MemberAdmin(UserAdmin):
inlines = [ContactInfoInline, PaymentInfoInline, MembershipPeriodInline,
PaymentInline, LockerInline, ThingUserInline]
inlines = [
ContactInfoInline,
LockerInline,
ThingUserInline,
PaymentInfoInline,
MembershipPeriodInline,
PaymentInline,
]
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
(_('Permissions'), {
'fields': ('is_active', 'is_superuser'),
}),
(_('Important dates'), {'fields': ('last_login', 'date_joined')}),
)
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff',
'is_active')
list_filter = (
Expand Down

0 comments on commit d3c8fa4

Please sign in to comment.