-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activator styles not applied on Python versions less than 3.11 #187
Comments
I figured out the difference between my local environment and the testapp that's causing the button variant's style to not apply. It is specifically this code from
One fix could be to copy the
|
Hello, I got more time to test and I realized that the reason the button labels were being set to None was just because I was missing the FormMixin as an inheritance 😅. |
can this issue then be closed? |
hello, the issue with strEnum is still there so i haven't closed the ticket yet, should i have created a different incident for that instead of changing this one? |
Outdated (see second comment), I've also changed the issue title to describe my other issue instead of the one here (see first comment)
Show outdated info
Hello, I managed to recreate this issue in the testapp where the text of an activator button is set to None when using a default_renderer. I have only tested the bootstrap renderer so far.It works properly when you use
{% render_form form "bootstrap" %}
in the template code instead of{{ form }}
.Steps to recreate:
mytest.py
andmytest.html
with the following code(I wasn't really sure how to edit the views.py)
address.py
by adding this codedefault_renderer = FormRenderer(form_css_classes='row mt-4', )
and I also changed the label of one of the activators just to confirm that my changes were reflectedlabel="Should be able to see this ",
urls.py
by addingIn my own code where I first discovered the bug, I also encountered an issue where the button variant style is not applied. When I inspected the rendered html code of the buttons, the class is being set to "btn btn-1" where the number after the dash corresponds to the appropriate button variant. I haven't been able to recreate this in the testapp though, so I am still testing what could be different.
Workaround
If anybody is also encountering this issue, I've been using this JS code as a workaround it's kind of fragile though depending on how you render your form.
The text was updated successfully, but these errors were encountered: