from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at the polls index.")
from django.conf.urls import patterns, url from polls import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), )
The next step is to point the root URLconf at the polls.urls module. In mysite/urls.pyinsert an include(), leaving you with:
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^polls/', include('polls.urls')), url(r'^admin/', include(admin.site.urls)), )
I am calling the page with "python manage.py runserver 0.0.0.0:8000" When I load up the page before adding the views and urls files, I see the polls and everything that I have set up with the codes from the previous pages of the tutorial. After adding the views and urls files, the page looks the same like, even though the direction tells me that I should see the "Hello world" message that I put in the views file. I ran another directory with different way to put up the views like in this tutorial (http://www.djangobook.com/en/2.0/chapter03.html) and I got the views working by itself, but using the djangoproject tutorial, I do not see the message.
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/OuG_9XUozlQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ee6f6ec9-f8e6-4101-8aa4-3e388a9d8ffa%40googlegroups.com.