PROBLEM

54 views
Skip to first unread message

David Figueroa

unread,
Dec 5, 2018, 7:17:07 AM12/5/18
to Django developers (Contributions to Django itself)
In creating my first django project- I'm trying to create my first application (polls) through a view as shown below.
I'm finding the error shown in the image in the Annex.
can anybody help me?
I'm following the step-by-step suggested in (https://docs.djangoproject.com/pt-br/1.11/intro/tutorial01/)
polls/view.py
Create your views here.
from django.http import HttpResponse


def index(request):
    return HttpResponse("Hello, world. You're at the polls index.")
pols/urls
from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
]
site1/urls
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),
]

2018-12-04 (7).png

Carlton Gibson

unread,
Dec 5, 2018, 7:22:52 AM12/5/18
to Django developers (Contributions to Django itself)
Hi David, 

This group is for "Contributions to Django itself". You need to head over to Django Users for support questions.

(But it looks like you didn't save your urls.py — the `polls/` route isn't shown as being searched.) 

Good luck!

Kind Regards,

Carlton

Reply all
Reply to author
Forward
0 new messages