konova/intervention/admin.py

53 lines
1.2 KiB
Python
Raw Normal View History

2021-07-01 13:36:07 +02:00
from django.contrib import admin
from intervention.models import Intervention, ResponsibilityData, LegalData, Revocation, InterventionDocument
from konova.admin import AbstractDocumentAdmin
2021-07-01 13:36:07 +02:00
class InterventionAdmin(admin.ModelAdmin):
list_display = [
"id",
"identifier",
2021-07-01 13:36:07 +02:00
"title",
"created",
"deleted",
2021-07-01 13:36:07 +02:00
]
class InterventionDocumentAdmin(AbstractDocumentAdmin):
pass
2021-07-01 13:36:07 +02:00
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",
]
2021-07-01 13:36:07 +02:00
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)