yig/franklincce/explorer/admin.py

19 lines
483 B
Python

from django.contrib import admin
from explorer import models
class LegislativeTextAdmin(admin.ModelAdmin):
list_display = ('__str__', 'legislation_title', 'school')
class LegislationBookAdmin(admin.ModelAdmin):
exclude = ("has_performed_export",)
to_register = [
[models.LegislativeText, LegislativeTextAdmin],
[models.LegislationBook, LegislationBookAdmin],
[models.LegislationClassification]
]
for i in to_register:
admin.site.register(*i)
print(i)