Skip to content

Showing error messages from FormCollection::full_clean() #46

Answered by jwoithe
jwoithe asked this question in Q&A
Discussion options

You must be logged in to vote

I think I now have an understanding about most of what I reported and observed yesterday. Thanks for the hints which lead to these discoveries.

On reflection I do not understand why it seemed I needed the manual '<div role="alert"...>' entry in the template. I subsequently noticed that there was a similar tag generated amongst the output produced by '{{ form_collection }}'. When I removed the manual tag the error messages were still shown. I therefore suspect that was a red herring. It probably appeared to make things work due to near-simultaneous changes to the format of the error passed to self._errors.append().

With no added tag in the template, calling

from formset.collection import C…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jwoithe
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jwoithe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants