Closed ym500 closed 3 years ago
Thanks for the report.
Please can provide a small reproducible example?
I have the same issue.
If I want to render a form from the model Django.contrib.auth.models.Group
the ManyToManyField
does not have the multiple attribute.
The model:
class Group(models.Model):
name = models.CharField(_('name'), max_length=150, unique=True)
permissions = models.ManyToManyField(
Permission,
verbose_name=_('permissions'),
blank=True,
)
The form renders a Select
field instead of Select with the Multiple
attribute
The template:
{% extends 'base.html' %}
{% load tailwind_filters %}
{% block content %}
<div class="w-80 mx-auto mt-5">
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<input class="px-3 py-2 hover:bg-gray-300 rounded" type="submit" value="Submit">
</form>
<div>
{% endblock %}
If I remove the filter | crispy
I get the field correctly.
Thanks @blasferna i will close the issue now
i think there is bug when rendering many to many field from modelform is being rendered without mutiple in HTML.