Re: URLs in error messages from form validation

2011-04-28 Thread Derek
On Apr 28, 12:33 pm, Tom Evans wrote: > On Mon, Apr 25, 2011 at 11:40 PM, Daniel Gerzo wrote: > > PS: I'm just wondering where did you find this? I was looking around the > > documentation and was unable to get any trace of such a function... > > http://docs.djangoproject.com/en/1.3/ref/utils/#mo

Re: URLs in error messages from form validation

2011-04-28 Thread Tom Evans
On Mon, Apr 25, 2011 at 11:40 PM, Daniel Gerzo wrote: > PS: I'm just wondering where did you find this? I was looking around the > documentation and was unable to get any trace of such a function... > http://docs.djangoproject.com/en/1.3/ref/utils/#module-django.utils.safestring Cheers Tom --

Re: URLs in error messages from form validation

2011-04-25 Thread Daniel Gerzo
On 25.4.2011 18:00, Jason Culverhouse wrote: You only need to mark the string as safe as in: http://docs.djangoproject.com/en/1.3/ref/utils/#module-django.utils.safestring from django.utils.safestring import mark_safe raise forms.ValidationError(mark_safe('We already have this filehere')) T

Re: URLs in error messages from form validation

2011-04-25 Thread Jason Culverhouse
On Apr 25, 2011, at 5:39 AM, Kane Dou wrote: > * Daniel Gerzo [2011-04-25 13:07:46 +0200]: > >> On 25.4.2011 12:40, Kane Dou wrote: >>> * Daniel Gerzo [2011-04-24 17:52:13 +0200]: >>> Hello all, say I have a following form: class MyForm(forms.Form): id = for

Re: URLs in error messages from form validation

2011-04-25 Thread Kane Dou
* Daniel Gerzo [2011-04-25 13:07:46 +0200]: > On 25.4.2011 12:40, Kane Dou wrote: > >* Daniel Gerzo [2011-04-24 17:52:13 +0200]: > > > >>Hello all, > >> > >>say I have a following form: > >> > >>class MyForm(forms.Form): > >> id = forms.IntegerField(max_length=9) > >> language = forms.Ch

Re: URLs in error messages from form validation

2011-04-25 Thread Daniel Gerzo
On 25.4.2011 12:40, Kane Dou wrote: * Daniel Gerzo [2011-04-24 17:52:13 +0200]: 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 cl

Re: URLs in error messages from form validation

2011-04-25 Thread Kane Dou
* Daniel Gerzo [2011-04-24 17:52:13 +0200]: > 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 c

URLs in error messages from form validation

2011-04-24 Thread Daniel Gerzo
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():