title: Template problems in Django
body: <p>I'm stuck at the <a href="https://docs.djangoproject.com/en/1.4/intro/tutorial03/" rel="nofollow noreferrer"><em>Write views that actually do something</em></a> section.
  I've modified my views to be the following as instructed:</p>
  
  <pre><code>from django.template import Context, loader
  from polls.models import Poll
  from django.http import HttpResponse
  
  def index(request):
      latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
      t = loader.get_template('polls/index.html')
      c = Context({
          'latest_poll_list': latest_poll_list,
      })
      return HttpResponse(t.render(c))
  
  def detail(request, poll_id):
      return HttpResponse("You're looking at poll %s." % poll_id)
  
  def results(request, poll_id):
      return HttpResponse("You're looking at the results of the poll %s." % poll_id)
  
  def vote(request, poll_id):
      return HttpResponse("You're voting on poll %s." % poll_id)
  </code></pre>
  
  <p>I've made my templates directory to be <code>/home/stanley/mytemplates/polls/</code> as instructed in the tutorial, and this is the relevant line which matches in the <code>settings.py</code>:</p>
  
  <pre><code>TEMPLATE_DIRS = (
      "/home/stanley/mytemplates/",
      # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
      # Always use forward slashes, even on Windows.
      # Don't forget to use absolute paths, not relative paths.
  )
  </code></pre>
  
  <p>However, I'm still seeing the following error message in my browser, after running the server in the localhost (<code>http://127.0.0.1:8000/polls/index.html</code>):</p>
  
  <pre><code>Page not found (404)
  Request Method: GET
  Request URL:    http://localhost:8000/polls/index.html
  Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
  ^polls/$
  ^polls/(?P&lt;poll_id&gt;\d+)/$
  ^polls/(?P&lt;poll_id&gt;\d+)/results/$
  ^polls/(?P&lt;poll_id&gt;\d+)/vote/$
  ^admin/
  ^admin/
  The current URL, polls/index.html, didn't match any of these.
  You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
  </code></pre>
  
  <p>I'm doing something wrong with my code or files, but can't quite figure out exactly what.</p>