Python-Django How to use django-ajax-uploader in admin?

I searched a lot on this, I was not lucky to find the exact answer.

I want to use django-ajax-uploader inside admin edit form.

I have a model with an image field. On the admin side, I exclude this field and insert ajax-uploader into the admin form via jquery. This is due to the fact that after an image downloaded through ajax-uploader increases the size of the cropped viewport, it becomes active that updates crop and resize dimension fields ... will be used with imagekit.

Now, when submitting a form, django cannot reach the file object.

Does anyone have an opinion?

+6
source share
1 answer

I feel like you are using a standard submit form and a server handler. This does not work for ajax uploader

According to https://github.com/GoodCloud/django-ajax-uploader#signals you need to process a special signal to store data from the ajax bootloader.

0
source

Source: https://habr.com/ru/post/908782/


All Articles