Wednesday, December 21, 2011

Re: TemplateDoesNotExist at /search/

On Dec 21, 7:18 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Wed, Dec 21, 2011 at 5:04 PM, Tebogo Moloi <ayob...@gmail.com> wrote:
> > Hi guys I am getting this error every time i submit the form, when the
> > submit and the field is empty the error message appears, which
> > indicates that django does see the templates which I have set in the
> > settings.
>
> Are you trying to say that if the form is submitted with failures, a
> template is found and rendered, and if it does not have failures,
> there is no template to be found?
>
> Have you invented quantum templates?
>
> More seriously, this sounds like one path through your view code - the
> initial displaying of the form, and redisplaying in case of errors -
> uses one template, and the success path uses a different template.
> In your traceback it is trying to load the template
> 'search_results.html', and it lists a bunch of locations where it is
> looking for that template.
>
> Does a template with that name exist in those locations (django says no)?
> Does your view refer to the wrong template name?
>
> Cheers
>
> Tom

Hi Tom

Thanks for the response, I just realized that search_form.html is the
form that renders the errors and once the query is successful the
should be a second file(search_results.html) which displays results.

Thanks for your help, and you really got me thinking about "Have you
invented quantum templates?" guess I needed that.

Cheers
Tebs

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate