forked from 42CTF/website
18 lines
491 B
Python
18 lines
491 B
Python
from .models import UserProfileInfo
|
|
from django.contrib import admin
|
|
from .models import Campus
|
|
|
|
#admin.site.register(UserProfileInfo)
|
|
# Register your models here.
|
|
|
|
@admin.register(UserProfileInfo)
|
|
class userprofile(admin.ModelAdmin):
|
|
#list display
|
|
list_display = ['user', 'score', 'last_submission_date', 'campus']
|
|
# search list
|
|
search_fields = ['score', 'user__username', 'campus__name']
|
|
|
|
@admin.register(Campus)
|
|
class campus(admin.ModelAdmin):
|
|
list_display = ['name']
|