This commit is contained in:
sherlockforrest
2023-06-20 09:22:53 +08:00
commit bf2ed2e31f
621 changed files with 271599 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from django.contrib import admin
from hrs.models import Dept, Emp
class DeptAdmin(admin.ModelAdmin):
list_display = ('no', 'name', 'location')
ordering = ('no', )
class EmpAdmin(admin.ModelAdmin):
list_display = ('no', 'name', 'job', 'sal', 'dept')
search_fields = ('name', 'job')
ordering = ('dept', )
admin.site.register(Dept, DeptAdmin)
admin.site.register(Emp, EmpAdmin)