Is it possible to use template tags in ValidationError's strings?

Posted by feelgood on Stack Overflow See other posts from Stack Overflow or by feelgood
Published on 2010-05-20T13:50:27Z Indexed on 2010/05/20 13:50 UTC
Read the original article Hit count: 191

I need to throw ValidationError containing anchor.

if not profile.activated():
    raise ValidationError('Your profile is not activated. <a href="{% url resend_activation_key %}">Resend activation key</a>.')

What I need to modify to make this work?

© Stack Overflow or respective owner

Related posts about django-forms

Related posts about django-templates