24 lines
480 B
Python
24 lines
480 B
Python
from django.contrib import admin
|
|
from .models import Profile
|
|
|
|
|
|
@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',)
|