diff options
Diffstat (limited to 'engagements/admin.py')
-rw-r--r-- | engagements/admin.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engagements/admin.py b/engagements/admin.py index 9861867..5c582ee 100644 --- a/engagements/admin.py +++ b/engagements/admin.py @@ -7,6 +7,7 @@ from .models import ( Organisation, Person, RegulatedEntityType, + RegulatoryCycle, RegulatoryRole, ) @@ -23,10 +24,20 @@ class PersonAdmin(admin.ModelAdmin): return f"{obj.first_name} {obj.last_name}" +class RegulatoryCycleAdmin(admin.ModelAdmin): + @admin.display(description="year") + def year(self, obj): + return f"{obj.get_year()}" + + list_display = ("__str__", "year") + ordering = ("-start_date",) + + site.register(Person, PersonAdmin) site.register(Organisation) site.register(RegulatedEntityType) site.register(RegulatoryRole) +site.register(RegulatoryCycle, RegulatoryCycleAdmin) site.register(EngagementType) site.register(Engagement) site.register(EngagementEffort) |