forked from prlbkj9i7/wzy
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.
43 lines
1.9 KiB
43 lines
1.9 KiB
6 months ago
|
from django.contrib import admin
|
||
|
from .models import *
|
||
|
|
||
|
admin.site.site_header = '医院预约管理系统'
|
||
|
admin.site.index_title = '首页'
|
||
|
|
||
|
|
||
|
class DepartmentAdmin(admin.ModelAdmin):
|
||
|
list_display = ('id', 'name', 'address')
|
||
|
search_fields = ['name', 'address']
|
||
|
list_filter = ('name', 'address')
|
||
|
ordering = ['id']
|
||
|
|
||
|
class PatientAdmin(admin.ModelAdmin):
|
||
|
list_display = ('id','name','sex','age','phone', 'password')
|
||
|
search_fields = ['id','name','sex','age','phone', 'password']
|
||
|
list_filter = ('id','name','sex','age','phone', 'password')
|
||
|
ordering = ['id']
|
||
|
|
||
|
class DoctorAdmin(admin.ModelAdmin):
|
||
|
list_display = ('id','name','sex','age','department','level','registration_price','description','phone', 'password')
|
||
|
search_fields = ['id','name','sex','age','department','level','registration_price','description','phone', 'password']
|
||
|
list_filter = ('id','name','registration_price','age','level','department')
|
||
|
ordering = ['id']
|
||
|
|
||
|
class TimeNumberAdmin(admin.ModelAdmin):
|
||
|
list_display = ('id','eight','nine','ten','eleven','fourteen','fifteen','sixteen','seventeen','default_number')
|
||
|
search_fields = ['id','doctor']
|
||
|
list_filter = ('id','doctor')
|
||
|
ordering = ['id']
|
||
|
|
||
|
class RegisterAdmin(admin.ModelAdmin):
|
||
|
list_display = ('id','patient','doctor','registration_time','consultation_hour','illness','address','out_trade_num','status','payway')
|
||
|
search_fields = ['id','patient','doctor','registration_time','consultation_hour','illness','address','isdelete','out_trade_num','status','payway']
|
||
|
list_filter = ('id','patient','doctor','registration_time','consultation_hour','illness','address','out_trade_num','status','payway')
|
||
|
ordering = ['id']
|
||
|
|
||
|
admin.site.register(Department, DepartmentAdmin)
|
||
|
admin.site.register(Patient, PatientAdmin)
|
||
|
admin.site.register(Doctor, DoctorAdmin)
|
||
|
admin.site.register(TimeNumber, TimeNumberAdmin)
|
||
|
admin.site.register(Register, RegisterAdmin)
|