f64a11cb50
* refactors documents and file upload to be distributed into different subfolders, depending on the type of document (InterventionDocument, RevocationDocument, ...) * refactors Document model into AbstractDocument * subclasses RevocationDocument, InterventionDocument, COmpensationDocument, EmaDocument and EcoAccountDocument from AbstractDocument to provide proper functionality for each * adds new specialized routes for each new document type (opening, removing) * drops generic get and remove routes for documents
40 lines
732 B
Python
40 lines
732 B
Python
"""
|
|
Author: Michel Peltriaux
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
|
Created on: 22.07.21
|
|
|
|
"""
|
|
from django.contrib import admin
|
|
|
|
from konova.models import Geometry, Deadline
|
|
|
|
|
|
class GeometryAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"created",
|
|
]
|
|
|
|
|
|
class AbstractDocumentAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"title",
|
|
"comment",
|
|
"created",
|
|
]
|
|
|
|
|
|
class DeadlineAdmin(admin.ModelAdmin):
|
|
list_display = [
|
|
"id",
|
|
"type",
|
|
"date",
|
|
"comment",
|
|
]
|
|
|
|
|
|
admin.site.register(Geometry, GeometryAdmin)
|
|
admin.site.register(Deadline, DeadlineAdmin)
|