Skip to content

Conversation

patrys
Copy link
Contributor

@patrys patrys commented Nov 27, 2014

This change was accepted as part of https://code.djangoproject.com/ticket/22276

@timgraham
Copy link
Member

I left a comment on the ticket about this.

@patrys
Copy link
Contributor Author

patrys commented Dec 15, 2014

@timgraham, could you review?

@mushahid54
Copy link

Hey,

Pass an error class like this

from django.forms.util import ErrorList

class ParagraphErrorList(ErrorList):
def unicode(self):
return self.as_paragraphs()

def as_paragraphs(self):
    return "<p>%s</p>" % (
        ",".join(e for e in self.errors)
    )

form = ContactForm(data=form_data, error_class=ParagraphErrorList)

@patrys
Copy link
Contributor Author

patrys commented Dec 15, 2014

@mushahid54 I'm sorry?

Copy link
Member

Choose a reason for hiding this comment

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

might be helpful to add a comment about this line -- I'd guess it's needed in order to render the formset in the absence of any other formset data, is that correct?

@timgraham timgraham changed the title [#22276] Do not raise ValidationError in .is_valid() if management form is invalid Fixed #22276 -- Surfaced ValidationError to end-user if management form is invalid Dec 17, 2014
@timgraham
Copy link
Member

Closing due to inactivity. Please send a new PR if someone can continue work on this.

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.

3 participants