Upgrading from 1.6.1 to 1.7.* - forms don't work
See original GitHub issue- Package version: 1.7.2 (or 1.7.0 or 1.7.1)
- Django version: 1.11.16
- Python version: 3.5.2
- Template pack: (Optional)
Description:
-
We upgraded Speedy Net from
django-crispy-forms==1.6.1
todjango-crispy-forms==1.7.2
-
We didn’t expect anything to change.
-
Our contact form stopped working in all 4 websites.
Preferably also include:
- Example Django Crispy Forms code
The tag is {% crispy form %}
on feedback_form.html
-
Screenshots
-
With
django-crispy-forms==1.6.1
: -
With
django-crispy-forms==1.7.2
:
- Actual HTML generated
There is no <textarea ...
in the HTML with 1.7.0 up to 1.7.2.
- Expected HTML
There is <textarea ...
in the HTML with 1.6.1.
I can’t paste HTML into this issue, I tried.
Issue Analytics
- State:
- Created 5 years ago
- Comments:39
Top Results From Across the Web
Cannot update from 1.6.1 to 1.7.0 - Get Help
The software update plugin gives an error when trying to update from 1.6.1 to 1.7.0. This happens on both of my two octoprints...
Read more >1.6.1.17 to 1.7.x Problem with 1 click upgrade module
Hello,. You will not be able to upgrade from PrestaShop 1.6 to 1.7 using the standard update module in 1 click, this will...
Read more >How to upgrade to to version 1.9.1 from a 1.5.0, 1.6.1 or 1.7 ...
Issue. Does the entire SBO system need to be upgraded to 1.5.0.171xx, 1.6.2.12xxx or 1.7.2.111xx before upgrading to 1.9.1 if the network ...
Read more >Upgrading 1.6.5 to 1.7
Before you begin, go to global configuration and on the server tab and in the Database Settings area find the database table prefix...
Read more >Upgrading VIVO to release 1.7
This document contains instructions on how to upgrade your installation of VIVO from Version 1.6 (or 1.6.1, or 1.6.2) to Version 1.7.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would like to reopen this issue. It’s very easy to reproduce for me.
Let’s have a ModelForm and add a few custom fields to it
If you render this form in Crispy Forms < 1.7.0 it works and renders both fields If you render this form in Crispy Forms >= 1.7.0 it renders field1 only
The reason is commit https://github.com/django-crispy-forms/django-crispy-forms/commit/6b93e8a362422db8fe54aa731319c7cbc39990ba which broke it. The ‘extra_field’ is neither required or hidden so it depends on render_unmentioned_fields which defaults to False. Since the field is mentioned in Meta.fields, it should be rendered. See also docs/form_helper.rst
I wonder why @ghinch committed this at all. If fields are mentioned in Meta.fields they should be unconditionally rendered, shouldn’t they?
and if I imported :
from crispy_forms.helper import FormHelper
in the forms.py it will yield another error :