You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a very strange behaviour when using an {% include %} statement along with the Django debug toolbar enabled. Django-widget-tweaks filters are ignored when using the following (_field.html just contains {{ field }}):
While it works fine when using {{ field }} in the main template instead of the include statement or when disabling the debug toolbar. Maybe the widget is rendered by the Django debug toolbar before being rendered in the page, and the original as_widget method is put back before it's rendered again in the template.
Just pip install the requirements, run the server, and go to https://localhost:8000/, you'll see the field that's included doesn't have the "title" attribute.
The text was updated successfully, but these errors were encountered:
I noticed a very strange behaviour when using an
{% include %}
statement along with the Django debug toolbar enabled. Django-widget-tweaks filters are ignored when using the following (_field.html
just contains{{ field }}
):While it works fine when using
{{ field }}
in the main template instead of theinclude
statement or when disabling the debug toolbar. Maybe the widget is rendered by the Django debug toolbar before being rendered in the page, and the originalas_widget
method is put back before it's rendered again in the template.I created a project here that demonstrates the bug: https://github.com/sephii/django-widget-tweaks-bug
Just
pip install
the requirements, run the server, and go to https://localhost:8000/, you'll see the field that's included doesn't have the "title" attribute.The text was updated successfully, but these errors were encountered: