18_File_upload_in_certain_folders #21

Merged
mpeltriaux merged 8 commits from 18_File_upload_in_certain_folders into master 2021-09-17 11:08:01 +02:00
Owner

Implements #18

# Implements #18
mpeltriaux added 8 commits 2021-09-17 11:07:46 +02:00
* 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
* increases max_size for FileFields --> triggers when the file name will be automatically changed during upload
* adds Http404 Exception in case document file does not exist anymore on the hard drive
* removes folder if last InterventionDocument is removed from an intervention and no RevocationDocument exists as well
* removes 'revocation' folder if RevocationDocument is removed from an intervention and removes the whole intervention document folder as well, if no other documents for this intervention exist
* adds further documentation
* refactors getting of related documents into Intervention model
* removes document file folder if the last CompensationDocument is removed from a compensation
* removes document file folder if the last EcoAccountDocument is removed from an eco account
* removes document file folder if the last EmaDocument is removed from an Ema
* adds try-except for removing folders in case of non existence or changed folder names on the hard drive
mpeltriaux merged commit 4f8d6e7036 into master 2021-09-17 11:08:01 +02:00
mpeltriaux deleted branch 18_File_upload_in_certain_folders 2021-09-17 11:08:07 +02:00
Sign in to join this conversation.
No description provided.