Thursday, September 1, 2011

Re: Unable to have a template NOT show up

Yes, you're correct.  Thanks for pointing that out.

I'll be honest, I get the impression that I'm at the deep end of the pool and not exactly dog-paddling very well :) .  I don't doubt that Django does A LOT of nice things for you, but this is a major step from my PHP coding days when all I had was HTML, PHP and MySQL.  I'm going to have to ask for a little bit of hand-holding at the moment.  Django looks wicked cool and I want to learn how it works, but doesn't seem have to have a small learning curve.

This is the book that I'll attack after getting done with this tutorial.

Anyways, this is my current error that I'm getting:

TemplateDoesNotExist at /polls/1/

 polls/detail.html
Request Method:GET
Request URL:http://127.0.0.1:8000/polls/1/
Django Version:1.3
Exception Type:TemplateDoesNotExist
Exception Value:
 polls/detail.html
Exception Location:C:\Python27\lib\site-packages\django\template\loader.py in find_template, line 138
Python Executable:C:\Python27\python.exe
Python Version:2.7.2
Python Path:
 ['C:\\Users\\ashvets\\Development\\Code\\mysite',  'C:\\Windows\\system32\\python27.zip',  'C:\\Python27\\DLLs',  'C:\\Python27\\lib',  'C:\\Python27\\lib\\plat-win',  'C:\\Python27\\lib\\lib-tk',  'C:\\Python27',  'C:\\Python27\\lib\\site-packages']
Server time:Thu, 1 Sep 2011 15:45:38 -0400

Template-loader postmortem

Django tried loading these templates, in this order:

  • Using loader django.template.loaders.filesystem.Loader:
    • c:\users\ashvets\my_templates\admin\base_site.html\polls\detail.html (File does not exist)
  • Using loader django.template.loaders.app_directories.Loader:
    • c:\python27\lib\site-packages\django\contrib\admin\templates\polls\detail.html (File does not exist)

On Thu, Sep 1, 2011 at 9:59 AM, Jirka Vejrazka <jirka.vejrazka@gmail.com> wrote:
Yves,

 this:

^polls/ ^polls/$
^polls/ ^polls/(?P<poll_id>\d+)/$
^polls/ ^polls/(?P<poll_id>\d+)/results/$
^polls/ ^polls/(?P<poll_id>\d+)/vote/$

 suggests that you did not follow the tutorial closely. Django keeps
telling you what's wrong - your urls.py in your application (pools)
duplicates the word "polls" in (most of) URL strings.

 HTH

   Jirka

--
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.


--
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.

No comments:

Post a Comment