Skip to content

Commit

Permalink
add label prefs to admin site
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Aug 2, 2024
1 parent 89f0f89 commit dc63d3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions auctions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,18 @@ class UserdataInline(admin.StackedInline):
'number_total_spent', 'rank_total_bids', 'number_total_bids', 'number_total_sold', \
'rank_total_sold', 'total_volume', 'rank_volume', 'seller_percentile', 'buyer_percentile', 'volume_percentile', )
readonly_fields = ('last_activity', 'dismissed_cookies_tos', 'last_auction_used', 'last_ip_address',)

class UserLabelPrefsInline(admin.StackedInline):
model = UserLabelPrefs
can_delete = False
verbose_name_plural = 'User Label Preferences'

# Extend Django's base user model
class UserAdmin(BaseUserAdmin):
list_display = ['username', 'first_name', 'last_name', 'email', 'last_activity', 'date_joined']
inlines = [
UserdataInline,
UserLabelPrefsInline,
AuctionTOSInline, # too much noise, but important to have
InterestInline, # too much noise
]
Expand Down

0 comments on commit dc63d3d

Please sign in to comment.