I am trying to create a django loading progress indicator in django admin. The application is only a small part of the project, so I do not want to install a custom download handler in settings.py.
Load_handler can be set using request.upload_handlers.insert(0, UploadProgressHandler(request)) , but not inside the add_view of the admin django class. The answer is an exception:
If you try to change request.upload_handlers after reading from request.POST or request.FILES, Django will throw an error.
I also tried to do this using a decorator over add_view , but then I don't know how to access request.upload_handlers .
Can someone help me?
python django django-admin file-upload
swoei
source share