django-widget-tweaks icon indicating copy to clipboard operation
django-widget-tweaks copied to clipboard

Tweak the form field rendering in templates, not in python-level form definitions. CSS classes and HTML attributes can be altered.

Results 45 django-widget-tweaks issues
Sort by recently updated
recently updated
newest added

I just ran across your package today - very convenient! I had previously viewed a StackOverflow post from someone who had created a Django filter to add a Bootstrap class...

With Django 5.0 BoundField.as_field_group() is available. Right now this library only uses str(bounded_field). Can we have an option to use the render() method?

Even setting in django settings: ``` DATE_FORMAT = "%d/%m/%Y" ``` when I use dender_field ``` {% render_field form.my_date class="form-control" type="date" %} ``` show `mm/dd/yyyy` format, instead of the settings config....

`{% render_field signupForm.date_of_birth value=request.user.date_of_birth|date:"Y-m-d" class="form-control datepicker" id="date_of_birth" required="true"%}` if you see i want format Y-m-d, but Im not able to use that filter. Django throws error. Thank you.

I have added to the readme a short explanation on how to render any form related errors. I was stuck on rendering non field related errors for couple of hours...

It's quite a simple addition. There is one disadvantage to this approach, which is that it assumes that the subfield will only be rendered with_label=False. I did this because it's...

enhancement
feature

It's possible to render choice fields this way: ``` {% for radio in form.my_radio_field %} {{ radio.tag }} {{ radio.choice_label }} {% endfor %} ``` This gives more control over...

patch needed

ModuleNotFoundError: No module named 'widget_tweaks'

Would it be possible to add `WIDGET_ERROR_CLASS` and `WIDGET_REQUIRED_CLASS` as settings? Can be an alternative to context processor.

patch needed
feature

This is for Firefox browser. In forms, added required=False in both forms.CharField(required=False) and forms.BooleanField(required=False). Checked Firefox inspector. For CharField, the "required" is not added and can be submitted without adding...

question