website/src/accounts/admin.py

18 lines
491 B
Python
Raw Normal View History

2021-07-10 11:18:24 +02:00
from .models import UserProfileInfo
from django.contrib import admin
2022-05-17 15:29:58 +02:00
from .models import Campus
2021-07-10 11:18:24 +02:00
#admin.site.register(UserProfileInfo)
2021-07-10 11:18:24 +02:00
# Register your models here.
@admin.register(UserProfileInfo)
class userprofile(admin.ModelAdmin):
#list display
2022-08-01 22:15:58 +02:00
list_display = ['user', 'score', 'last_submission_date', 'campus']
# search list
2022-08-29 14:01:05 +02:00
search_fields = ['score', 'user__username', 'campus__name']
2022-05-17 15:29:58 +02:00
@admin.register(Campus)
class campus(admin.ModelAdmin):
2022-08-01 22:15:58 +02:00
list_display = ['name']