The index.html file is in the right location, what worries me is that
the template loaders are showing that they are loading nothing. In all
the other qustion in the google groups here that referenced an isssue
with templates not loading, their traceback had something like unable
to find documnet at c:\blah\blah\tmplates. Mine is empty. All the
files have the same owner, but nothing is loading.

My template_dir is pointed to /home/me/Templates and I have tried it
with with index.html being in there and in a dir called polls/, same
thing no matter what

Urls.py
  GNU nano 2.2.4               File: urls.py

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^tutorial/', include('tutorial.foo.urls')),
    (r'^polls/$', 'polls.views.index'),
    (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
    (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
    (r'^polls/(?P<polls_id>\d+)/vote/$', 'polls.views.vote'),
    # Uncomment the admin/doc line below to enable admin
documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
)


On Oct 21, 2:43 pm, Robbington <robbing...@hotmail.co.uk> wrote:
> Where is your template_dirs in settings.py pointed too?
> If you can post your urls.py.
>
> Looking at the tutorial again,
>
> (r'^polls/$', 'polls.views.index'), means that the url 'polls' will
> serve the index function in the views.py file inside your polls app.
> Your index.html should lie inside the top level of your templates
> directory and will serve what ever you set as your top level domain
> name, orhttp://192.168.1.131:9999/of course you have to set that up
> in your urls.py
>
> I use urlpatterns = patterns('django.views.generic.simple',
>     (r'^$', 'direct_to_template',{'template': 'index.html'}),
>
> and then you would have
>
>      (r'polls/$ , ('polls.view.index')

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to