#18 File upload in certain folders

* 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
This commit is contained in:
mipel
2021-09-01 16:24:49 +02:00
parent 17d574e2a5
commit f64a11cb50
25 changed files with 437 additions and 109 deletions

View File

@@ -24,6 +24,8 @@ urlpatterns = [
# Documents
# Document remove route can be found in konova/urls.py
path('<id>/document/new/', document_new_view, name='new-doc'),
path('document/<doc_id>', get_document_view, name='get-doc'),
path('document/<doc_id>/remove/', remove_document_view, name='remove-doc'),
# Generic state routes
path('state/<id>/remove', state_remove_view, name='state-remove'),