Wednesday, December 5, 2018

Re: Problem Basic

Fala David, conseguiu?

tenta mudar o caminho 
url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),

pra isso

from django.urls import path
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),




Em ter, 4 de dez de 2018 às 23:55, David Figueroa <davidfigueroalafont@gmail.com> escreveu:
Na criação de meu primeiro projeto django- estou tentando criar minha primeira aplicação (polls) através de uma  view como mostrado abaixo.
estou encontrando o erro mostrado na imagem do Anexo.
Alguém poderia me ajudar?

Estou seguindo o passo a passo sugerido em. (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),
]

--
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/aeee4a25-8c43-41ce-8ed0-744107f61cdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CALvrLTuVT9CO6Z6HAThrfy30oBuxAW%2Borgp7YK%3DM%3Dd8MCDMzhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment