and you're getting this from the URL *localhost:8000/polls/ *?

On Saturday, March 10, 2018 at 8:31:34 AM UTC-5, Usman Gill wrote:
>
> Using the URLconf defined in mysite.urls, Django tried these URL patterns, 
> in this order:
>
> polls/ [name='index']
> admin/
>
> The current path, polls/, didn't match any of these.
>
>
> My code is... from (app)polls urls.py
>
>
> from django.urls import pathfrom . import views
>
>
> urlpatterns = [
>     path('', views.index, name='index'),]
>
> from (project)mysite urls.py
>
> from django.urls import include, pathfrom django.contrib import admin
>
>
> urlpatterns = [
>     path('polls/', include('polls.urls')),
>     path('admin/', admin.site.urls),
> ]
>
> from views.py project file
>
> from django.shortcuts import renderfrom django.http import HttpResponse
> def index(request):
>     return HttpResponse("Hello world, you are at the polls index.")
>
>

-- 
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+unsubscr...@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/5ac32509-5517-4e33-ab78-7ad86ec9c54e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to