django-crispy-bulma
django-crispy-bulma copied to clipboard
Check compatibility with Django 3.0
Probably easiest to just test it with Django 3 and see what happens. I imagine it will probably more or less work.
Copying https://github.com/python-discord/django-crispy-bulma/pull/32#issuecomment-617921850 to this issue
I just tried to use the module with Django 3.0 and I noticed that the email input is not working as expected. It gets rendered to
<input type="email" name="email" maxlength="254" class="emailinput" id="id_email">
Though on the bulma webpage the CSS-class is solely "input". Could someone please check this?
Another problem is that the ManyToManyField
does not seem to be rendered correctly. In the default rendering the layout breaks with following fields. Adding the is-multiple
seems to fix the issue:
<div class="select">
➞ <div class="select is-multiple">
It gets even worse when enforcing a CheckboxSelectMultiple
:
admins = forms.ModelMultipleChoiceField(
queryset=User.objects.all(),
widget=forms.CheckboxSelectMultiple(),
)
In this case nothing is shown at all.
Another problem for BooleanFields: the input field for the checkbox seems to be rendered twice. For example:
<div id="div_id_is_active" class="field">
<input type="checkbox" name="is_active" class="checkboxinput" id="id_is_active" checked="">
<label for="" class="label">Is active</label>
<p class="control">
<input type="checkbox" name="is_active" class="checkboxinput" id="id_is_active" checked="">
</p>
<p id="hint_id_is_active" class="help">Only activated items are shown to the user.</p> </div>