django-crispy-bulma icon indicating copy to clipboard operation
django-crispy-bulma copied to clipboard

Check compatibility with Django 3.0

Open lemonsaurus opened this issue 4 years ago • 3 comments

Probably easiest to just test it with Django 3 and see what happens. I imagine it will probably more or less work.

lemonsaurus avatar Mar 21 '20 00:03 lemonsaurus

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?

MarkKoz avatar Apr 23 '20 04:04 MarkKoz

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.

keans avatar Apr 25 '20 13:04 keans

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>

keans avatar Apr 30 '20 13:04 keans