Monday, February 29, 2016

Re: Error running Django tutorial

I found the problem.

When the mysite\urls.py file is created, it has this line already in it.

from django.conf.urls import url

The tutorial asks you to add the following lines to the file.

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
]

I must did not notice that the 'include' was different, and so I had not placed it into the file.  I changed the file to add the 'include' and everything worked.

Thank you for the help.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/baedaefb-d570-4154-9ed1-95fba413ff71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment