TrangPham / django-admin-confirm

AdminConfirmMixin is a mixin for ModelAdmin that adds confirmations to changes, additions and actions.
Other
129 stars 16 forks source link

Images not uploaded on local storage #29

Closed harris-irfan closed 1 year ago

harris-irfan commented 3 years ago

Steps to reproduce:

  1. In a model, let us say Model A, add an image field:

    image = models.ImageField()

  2. Set the following in the ModelAdmin using the AdminConfirmMixin:

    confirm_change = True confirm_add = True

  3. Add a new entry from Django admin against Model A and choose an image.

  4. Submit the form.

  5. Submit the confirmation form.

  6. The following error will be displayed on the console and the confirmation form will not be submitted:

    "An invalid form control with name='image' is not focusable."

The same error occurs if you modify the image field in an existing entry.

Note:

TrangPham commented 3 years ago

Which version of django-admin-confirm are you using?

There has been multiple issues with file/image fields. I will need to dig in deeper to understand how to safely pass the request.FILES through the confirmation page

harris-irfan commented 3 years ago

@TrangPham I'm using the latest version 0.2.3.

TrangPham commented 3 years ago

@harris-irfan I've uploaded a new version with updated file caching. Could you retry the failing upload with v0.2.4? Thanks I would really appreciate that

TrangPham commented 1 year ago

This should be fixed in the latest version. I am closing this issue due to inactivity.