Skip to content

Commit

Permalink
Allow sorting and filtering by Profile.date_joined in Django admin
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Oct 31, 2024
1 parent 3afa4de commit f2783e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RIGS/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ class Meta:

@admin.register(models.Profile)
class ProfileAdmin(UserAdmin, AssociateAdmin):
list_display = ('username', 'name', 'is_approved', 'is_superuser', 'is_supervisor', 'number_of_events', 'last_login')
list_display = ('username', 'name', 'is_approved', 'is_superuser', 'is_supervisor', 'number_of_events', 'last_login', 'date_joined')
list_display_links = ['username']
list_filter = UserAdmin.list_filter + ('is_approved',)
list_filter = UserAdmin.list_filter + ('is_approved','date_joined')
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {
Expand Down

0 comments on commit f2783e6

Please sign in to comment.