What modification to codes required, pls in project mysite/mysite/polls(app)
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/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),
]


On Mon, Nov 26, 2018 at 10:57 AM Jason <[email protected]> wrote:

> whatever you have as url patterns is not a list, tuple or other iterable.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/20504ff8-1711-4b9b-9b60-300083a8a60c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/20504ff8-1711-4b9b-9b60-300083a8a60c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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/CAN%2BaYhcmUXjGgSeGazYB3c99t0XpgF_y4ykA64ePm%2B_uFApx3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to