2024-06-19 01:29:05 -05:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2024-06-28 16:36:06 -05:00
|
|
|
from explorer import models
|
2024-06-19 05:41:13 -05:00
|
|
|
|
2024-06-19 12:41:41 -05:00
|
|
|
class LegislativeTextAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('__str__', 'legislation_title', 'school')
|
|
|
|
|
|
|
|
class LegislationBookAdmin(admin.ModelAdmin):
|
|
|
|
exclude = ("has_performed_export",)
|
|
|
|
|
2024-06-28 16:36:06 -05:00
|
|
|
to_register = [
|
|
|
|
[models.LegislativeText, LegislativeTextAdmin],
|
|
|
|
[models.LegislationBook, LegislationBookAdmin],
|
2024-06-29 23:19:39 -05:00
|
|
|
[models.LegislationClassification],
|
|
|
|
[models.School],
|
2024-06-29 23:41:33 -05:00
|
|
|
[models.Country],
|
2024-07-24 00:13:30 -05:00
|
|
|
[models.Sponsor],
|
2024-06-28 16:36:06 -05:00
|
|
|
]
|
|
|
|
for i in to_register:
|
2024-06-29 15:48:53 -05:00
|
|
|
admin.site.register(*i)
|