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
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
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
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
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
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
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
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
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
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
10 matches
Mail list logo