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.
22 lines
685 B
22 lines
685 B
from django.contrib import admin |
|
from update.models import Cinema |
|
|
|
|
|
# Register your models here. |
|
@admin.register(Cinema) |
|
class Cinema(admin.ModelAdmin): |
|
admin.site.site_title = '影院管理' |
|
admin.site.site_header = '影院管理' |
|
admin.site.index_title = '影院管理' |
|
# 设置显示字段 |
|
list_display = ['name', 'ip', 'zz_num', 'inner_id', 'db_user', 'db_pwd', 'sys_ver', 'client_ver', 'update_time'] |
|
# 设置搜素条件 |
|
search_fields = ['ip'] |
|
# 设置过滤条件 |
|
list_filter = ['ip', 'sys_ver'] |
|
# 设置日期选择器 |
|
data_hierarchy = 'update_time' |
|
# 设置分页 |
|
list_per_page = 10 |
|
# 设置排序 |
|
ordering = ['ip']
|
|
|