views:

404

answers:

1

Django: How can I put an <a> hyperlink in a django validation error from a forms clean() method? I want to raise a validation error, and in the error text have an <a href=""></a> hyperlink that has a link that would help the user correct the error. This is a validation error I'm raising in a clean method of a form. Is there a way to mark the HTML for that validation error as safe to output as HTML?

+5  A: 

Call mark_safe on the error message string when you're raising the ValidationError

insin