135f25d88b
* adds functionality for check button * adds highlighting of important data on detail view for intervention * adds deleting logic to BaseObject model and BaseResource model * adds RunCheckForm * adds check_validity() method to Intervention class * fixes wrong success msg for adding documents * adds/updates translations
50 lines
1.0 KiB
Python
50 lines
1.0 KiB
Python
from django.contrib import admin
|
|
|
|
from intervention.models import Intervention, ResponsibilityData, LegalData, Revocation
|
|
|
|
|
|
class InterventionAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"identifier",
|
|
"title",
|
|
"created",
|
|
"deleted",
|
|
]
|
|
|
|
|
|
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",
|
|
"law",
|
|
"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)
|