Add Premium feature with UI, model changes, and admin configuration
This commit is contained in:
parent
95111240bc
commit
abe4a1a965
7 changed files with 156 additions and 6 deletions
|
|
@ -1,3 +1,24 @@
|
|||
from django.contrib import admin
|
||||
from .models import Profile
|
||||
|
||||
# Register your models here.
|
||||
|
||||
@admin.register(Profile)
|
||||
class ProfileAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
'user',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'is_premium',
|
||||
'birth_date',
|
||||
)
|
||||
search_fields = (
|
||||
'user__username',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'biography',
|
||||
)
|
||||
list_filter = (
|
||||
'is_premium',
|
||||
'birth_date',
|
||||
)
|
||||
autocomplete_fields = ('user',)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue