Make sure that general form errors are rendered if present #3059
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@stveit discovered that general form errors were not rendered while working on #3058. This PR fixes the issue for #3058 in particular and for forms from #2794 in general.
The template used for rendering general form errors is uncrispyfied, even though it is located in foundation-5 dir.
This PR ensures 1:1 behaviour with crispy forms in NAV, ref https://github.com/django-crispy-forms/django-crispy-forms/blob/baf94397a011b3f15a9899097234caa68b86a65e/crispy_forms/templates/uni_form/display_form.html#L4 which always executes in NAV since
form_show_errors
isTrue
by default in crispy'sFormHelper
and we never set it toFalse
in code or context.