mpeltriaux
4ae5b38198
* renames model ResponsibilityData into Responsibility * renames model LegalData into Legal * moves form->object saving logic into model * refactors NewDocumentForm into special types for intervention, compensation, eco account and ema *
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
from django.contrib import admin
|
|
|
|
from intervention.models import Intervention, Responsibility, Legal, 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(Responsibility, ResponsibilityAdmin)
|
|
admin.site.register(Legal, LegalAdmin)
|
|
admin.site.register(Revocation, RevocationAdmin)
|
|
admin.site.register(InterventionDocument, InterventionDocumentAdmin)
|