mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 17:50:16 -04:00
feat(authentication): admin add fields
add is_banned field and filtering on biography
This commit is contained in:
parent
0aa3525f25
commit
a7aa9a7bc3
|
@ -6,7 +6,14 @@ from .models import User
|
||||||
class UserAdmin(admin.ModelAdmin):
|
class UserAdmin(admin.ModelAdmin):
|
||||||
search_fields = ["username", "first_name", "nickname", "last_name"]
|
search_fields = ["username", "first_name", "nickname", "last_name"]
|
||||||
list_display = ["username", "last_name", "preferred_name", "last_modified"]
|
list_display = ["username", "last_name", "preferred_name", "last_modified"]
|
||||||
list_filter = ["is_senior", "is_student", "accepted_terms", "publish_data"]
|
list_filter = [
|
||||||
|
"is_senior",
|
||||||
|
"is_student",
|
||||||
|
"is_banned",
|
||||||
|
"accepted_terms",
|
||||||
|
"publish_data",
|
||||||
|
["biography", admin.EmptyFieldListFilter],
|
||||||
|
]
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(
|
(
|
||||||
|
@ -26,6 +33,7 @@ class UserAdmin(admin.ModelAdmin):
|
||||||
"is_senior",
|
"is_senior",
|
||||||
"graduation_year",
|
"graduation_year",
|
||||||
"is_student",
|
"is_student",
|
||||||
|
"is_banned",
|
||||||
"last_modified",
|
"last_modified",
|
||||||
"last_login",
|
"last_login",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user