You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
464 B

from django.contrib import admin
from django.core.paginator import Paginator
from Student.models import Student
# Register your models here.
class StudentAdmin(admin.ModelAdmin):
list_display = ("username", "password", "name", "sex", "grade", "class_name", "major")
list_per_page = 5
list_filter = ('sex', 'grade', 'class_name', "major")
search_fields = ("name", "sex", "grade", "class_name", "major")
admin.site.register(Student, StudentAdmin)