Hello all,

say I have a following form:

class MyForm(forms.Form):
    id = forms.IntegerField(max_length=9)
    language = forms.CharField(max_length=10)
    file = forms.FileField()

And a following pseudo clean method:

    def clean(self):
        for file in self.files.values():
            if file_exists(file):
raise forms.ValidationError('We already have this file <a href="/somehwere">here</a>')
        return self.cleaned_data

So I want to display a URL in the error message. The text is displayed fine, but the URL is being escaped by Django and thus is not clickable. Is there some way to disable it for this specific case?

The form is being rendered like:

<form enctype="multipart/form-data" method="post" action="" id="upload">{% csrf_token %}
    <table>
        {{ form.as_table }}
<tr><td><input type="submit" value="Upload" /></td><td><input type="reset" value="Reset" /></td></tr>
    </table>
    </form>

Thanks.

--
Kind regards
  Daniel Gerzo

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to