Validating a specific form field

2012-06-12 Thread gnesher
I'm trying to catch a specific error for a specific form field. at the moment I'm doing something like this : if form.is_valid(): else: if 'email' in form.errors and form.errors['email'][0] == 'Email address has already entered today': but this seems like a bad way of doing this (error me

Re: Django static files STATIC_ROOT vs STATICFILES_FINDERS

2012-04-23 Thread gnesher
configure your webserver to serve > at STATIC_URL. The docs are pretty clear on this: > > https://docs.djangoproject.com/en/1.4/howto/static-files/ > > Regards > Phil > > On 23/04/2012 12:49, gnesher wrote: > > > > > > > > > > > But then sho

Re: Django static files STATIC_ROOT vs STATICFILES_FINDERS

2012-04-23 Thread gnesher
in there. > > Regards > Phil > > On 23/04/2012 12:32, gnesher wrote: > > > > > > > > > > > Hi, > > > I'm not sure if this is a bug or am I missing something but I've > > created a very simple test environme

Django static files STATIC_ROOT vs STATICFILES_FINDERS

2012-04-23 Thread gnesher
Hi, I'm not sure if this is a bug or am I missing something but I've created a very simple test environment and placed a single png file within my static folder. The file is being served fine when I set : STATIC_ROOT = '' STATICFILES_DIRS = ( '/Users/guynesher/Work/play/quicktest/testproj/sta

Loading static files from a dev environment

2012-04-23 Thread gnesher
I'm having an odd problem with my test Django environment. It seems that static filles I've collected from different apps using the collectstatic command works fine, while other static files I placed in myself result in 404 error. This can happen from the same directory (where a png that was colle

Re: loader.select_template breaks template name

2012-04-08 Thread gnesher
ame can't be > found. > > Make a call to loader.select_template(['test.html']), and everything should > work as expected. > > Yours, > Russ Magee %-) > > > > > > > > On Sunday, 8 April 2012 at 4:01 AM, gnesher wrote: > > Hi, > &g

Re: loader.select_template breaks template name

2012-04-08 Thread gnesher
e of > the data; it only raises an error because the single-letter filename can't be > found. > > Make a call to loader.select_template(['test.html']), and everything should > work as expected. > > Yours, > Russ Magee %-) > > > > > > > &g

Re: loader.select_template breaks template name

2012-04-08 Thread gnesher
a > whitespace between h and tml on my screen. I suggest you retype the > template name from scratch. There might be some odd character out of > place. > Hth > > On 7 apr, 22:01, gnesher wrote: > > > > > > > > > Hi, > > > I'm receivin

Re: loader.select_template breaks template name

2012-04-08 Thread gnesher
a > whitespace between h and tml on my screen. I suggest you retype the > template name from scratch. There might be some odd character out of > place. > Hth > > On 7 apr, 22:01, gnesher wrote: > > > > > > > > > Hi, > > > I'm receiving som

loader.select_template breaks template name

2012-04-07 Thread gnesher
Hi, I'm receiving some odd results while playing with select_template (Django 1.4) I'm calling the following code in my view: loader.select_template('test.html') Which results in the following error: TemplateDoesNotExist at /test t, e, s, ., h, m, l Can't really figure out what I'm doing wrong