b39e96c495
* refactors law field from ForeignKey to ManyToManyField to support multiple laws being added to one LegalData object * added funding data to EMA detail view
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
from django.contrib import admin
|
|
|
|
from intervention.models import Intervention, ResponsibilityData, LegalData, Revocation, InterventionDocument
|
|
from konova.admin import AbstractDocumentAdmin
|
|
|
|
|
|
class InterventionAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"identifier",
|
|
"title",
|
|
"created",
|
|
"deleted",
|
|
]
|
|
|
|
class InterventionDocumentAdmin(AbstractDocumentAdmin):
|
|
pass
|
|
|
|
class ResponsibilityAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"registration_office",
|
|
"registration_file_number",
|
|
"conservation_office",
|
|
"conservation_file_number",
|
|
"handler",
|
|
]
|
|
|
|
|
|
class LegalAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"process_type",
|
|
"registration_date",
|
|
"binding_date",
|
|
]
|
|
|
|
|
|
class RevocationAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"date",
|
|
"comment",
|
|
"created",
|
|
]
|
|
|
|
|
|
admin.site.register(Intervention, InterventionAdmin)
|
|
admin.site.register(ResponsibilityData, ResponsibilityAdmin)
|
|
admin.site.register(LegalData, LegalAdmin)
|
|
admin.site.register(Revocation, RevocationAdmin)
|
|
admin.site.register(InterventionDocument, InterventionDocumentAdmin)
|