Skip to content
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

Bump django-crispy-forms to 2.0 #61

Merged

Conversation

olivierphi
Copy link
Contributor

@olivierphi olivierphi commented Jan 12, 2024

Similar to #28 , but focused on the upgrade of the django-crispy-forms dependency only 🙂

  • Add Python 3.12
  • Remove Django 2.2, 3.0 and 3.1
  • Add Django 4.1 and 4.2

CI passes: https://github.com/olivierphi/tbxforms/actions/runs/7447980089 ✔️

tbxforms/layout/buttons.py Show resolved Hide resolved
tests/test_security.py Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
@olivierphi olivierphi marked this pull request as ready for review January 12, 2024 09:32
@@ -25,7 +25,7 @@
{% if field.label and not field|is_checkbox and form_show_labels %}
{% if label_tag %}<{{ label_tag }} class="tbxforms-label-wrapper">{% endif %}
<label for="{{ field.id_for_label }}" class="tbxforms-label{% if label_size %} {{ label_size }}{% endif %}">
{{ field.label|safe }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three settings are still mentioned within the README and referenced within code:

  1. TBXFORMS_ALLOW_HTML_LABEL
  2. TBXFORMS_ALLOW_HTML_HELP_TEXT
  3. TBXFORMS_ALLOW_HTML_BUTTON

Do they still have a place, do you think?

With |safe removed, I wonder if we should also remove these and rely solely on developers marking values as safe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least TBXFORMS_ALLOW_HTML_BUTTON seemed fairly unnecessary to me as well. Still, I guess it's usually only a small number of fields where html is needed, so perhaps it's better to handle those cases individually and remove all three of these options. It might be enough to give an example in the readme how to do that exactly.

@kbayliss
Copy link
Collaborator

Can you please update the Django and django-crispy-forms requirements listed in the README: https://github.com/torchbox/tbxforms#requirements

@kbayliss kbayliss linked an issue Jan 31, 2024 that may be closed by this pull request
2 tasks
@kbayliss kbayliss merged commit fda1bd7 into torchbox:main Feb 2, 2024
6 checks passed
@olivierphi
Copy link
Contributor Author

Ah, I just noticed that this was merged - sorry I couldn't address your comments, I found myself in a "client work" whirlwind these last few weeks 😔

@kbayliss
Copy link
Collaborator

kbayliss commented Feb 2, 2024

No worries, a few other MRs have merged recently, so I'm working through a few changes (including those!) to prep a release :).

Thanks for everything you've done here - it's all looking mega!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump django-crispy-forms to 2.0
3 participants