I have a standard Django Admin page that is used to upload multiple files. I wish to do the following:
- upload some of the files directly
- One file need to be encrypted with AES before save (encryption can be done by python or through http to an encryption server.)
- A zip file needed to be unzip, process and re-package.
I only have a very basic admin page now. Can anyone point me to the right direction in where to start with? Please point me exactly which file i need to modified as i am still unfamiliar with django.
Just a brief direction will be appreciated. Thank you.
Some options would be:
I would go with option 1 for potentially lengthy/slow operations. The #2 is interesting if you already have mad^H^H^Hgood Python skills.
I didn't test these code, but I can just direct you where to start. I would suggest you to write the code of unzipping at the model's save function. This is the easiest way but not the best. Django admin can handle multiple form as customizing django admin.
I hope your models are somewhat like these
Create admin.py in the related app customizing your admin to handle multiple insertion:
Here is also Unzip a .zip file uploaded with FileBrowser code but it could be a little bit complicated due to using FileBrowser app. You can unzip file just using the zipfile python module. Also you may use PyCrypto at AES encryption.