Open arunk opened 3 hours ago
Just as a follow up turns out crispy forms does require some special things for custom widgets. But everything I have done in my custom widget, is there in your custom widget as well. So I'm not sure why it isn't working. I will raise the issue on crispy-forms repo as well. here is the docs for crispy-forms
I'm trying your uploader widget in a form, but couldn't get it to display. No matter what I did, it seemed to show the default FileUpload widget. Then I started debugging the issue one at a time, and finally when I stopped using
{% crispy form %}
to display the form and instead used{{ form.as_p }}
to display it, your widget worked. Is there anything in particular about your widget that might not make it work with crispy forms? I am using a few custom widgets with the crispy library and have not had any issues. I will raise the issue in the crispy library github repo as well. Do let me know if you need any logging information or anything else about my current configuration.My environment: Python 3.12 Django 4.2.16 Latest version of django-image-uploader-widget==1.0.0