Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango TemplateDoesNotExist
    primarykey
    data
    text
    <p>Ok so I have a project called tvlistings and an app called progguide.</p> <p>In my tvlistings directory I have the following in these files</p> <p>settings.py</p> <pre><code>TEMPLATE_DIRS = ( '/home/paul/tvlistings/progguide/templates', ) </code></pre> <p>urls.py</p> <pre><code>from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^progguide/', include('progguide.urls')), ) </code></pre> <p>In my progguide directory I have</p> <p>urls.py</p> <pre><code>from django.conf.urls.defaults import * urlpatterns = patterns('progguide.views', (r'^$', 'index'), (r'^(?P&lt;prog_id&gt;\d+)/$', 'programme'), ) </code></pre> <p>views.py</p> <pre><code>from django.shortcuts import render_to_response from progguide.models import * def index(request): chan_prog_list = ChannelProgramme.objects.all().order_by('progdate','starttime')[:5] return render_to_response('progguide/index.html', {'chan_prog_list': chan_prog_list}) </code></pre> <p>And in /home/paul/tvlistings/progguide/templates I have</p> <p>index.html</p> <pre><code>{% if chan_prog_list % } &lt;ul&gt; {% for prog in chan_prog_list %} &lt;li&gt;{{ prog.channelid.channelname}} {{ prog.programmeid.progtitle }}&lt;/li&gt; {% endfor %} &lt;/ul&gt; {% else %} &lt;p&gt;No programmes.&lt;/p&gt; {% endif %} </code></pre> <p>If I try to load <a href="http://localhost:8000/progguide" rel="nofollow">http://localhost:8000/progguide</a> I get</p> <blockquote> <p>TemplateDoesNotExist at /progguide/</p> <p>progguide/index.html</p> <p>Request Method: GET Request URL: <a href="http://127.0.0.1:8000/progguide/" rel="nofollow">http://127.0.0.1:8000/progguide/</a> Django Version: 1.2.4 Exception Type: TemplateDoesNotExist Exception Value:</p> <p>progguide/index.html</p> </blockquote> <p>Still very new to this, the above looks ok from what I understand. What am I missing?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload