Sunday, April 22, 2018

I know this question has been asked before, but I haven't found an answer that solves my situation. I'm looking at the Django tutorial, and I've set up the first URLs exactly as the tutorial has it, word for word, but when I go to http://http://loca

polls/views.py
from django.http import HttpResponse      def index(request):      return HttpResponse("Hello, world. You're at the polls index.")

polls/urls.py
from django.urls import path    from . import views    urlpatterns = [      path('', views.index, name='index'),  ]

mysite/urls.py
from django.contrib import admin  from django.urls import include, path    urlpatterns = [      path('polls/', include('polls.urls')),      path('admin/', admin.site.urls),  ]

--
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/e277e38e-9ae4-4a58-bc84-fd79bdd63205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment