Show your URLs.py On Wed 23 May, 2018, 3:22 PM Umar Kambala, <[email protected]> wrote:
> Plz I need ur help, I found this error TemplateDoesNotExit at polls/1/ > On May 22, 2018 6:29 PM, "김영찬" <[email protected]> wrote: > >> urlpatterns = [ >> path('', include('polls.urls')), >> path('admin/', admin.site.urls) >> ] >> >> In this chuck of code, you should write like this, >> >> urlpatterns = [ >> path('polls/', include('polls.urls')), >> path('admin/', admin.site.urls), >> ] >> >> 2018년 5월 23일 (수) 오전 12:27, Avitab Ayan Sarmah <[email protected]>님이 >> 작성: >> >>> Mysite\urls.py: >>> from django.contrib import admin >>> from django.urls import include, path >>> >>> urlpatterns = [ >>> path('', include('polls.urls')), >>> path('admin/', admin.site.urls), >>> ] >>> >>> polls\urls.py: >>> from django.urls import path >>> >>> from . import views >>> >>> app_name = 'polls' >>> urlpatterns = [ >>> # ex: /polls/ >>> path('', views.IndexView.as_view(), name='index'), >>> # ex: /polls/5/ >>> path('<int:pk>/', views.DetailView.as_view(), name='detail'), >>> # ex: /polls/5/results/ >>> path('<int:pk>/results/', views.ResultsView.as_view(), name='results'), >>> # ex: /polls/5/vote/ >>> path('<int:question_id>/vote/', views.vote, name='vote'), >>> ] >>> >>> >>> On Friday, May 18, 2018 at 10:42:17 PM UTC+5:30, James Farris wrote: >>>> >>>> What does your urls.py look like? >>>> >>>> According to the error it doesn’t appear that polls/ is defined in your >>>> urls.py file >>>> >>>> On Fri, May 18, 2018 at 10:05 AM Avitab Ayan Sarmah <[email protected]> >>>> wrote: >>>> >>>>> Page not found (404) >>>>> Request Method: GET >>>>> Request URL: http://localhost:8000/polls/ >>>>> >>>>> Using the URLconf defined in mysite.urls, Django tried these URL >>>>> patterns, in this order: >>>>> >>>>> 1. [name='index'] >>>>> 2. <int:pk>/ [name='detail'] >>>>> 3. <int:pk>/results/ [name='results'] >>>>> 4. <int:question_id>/vote/ [name='vote'] >>>>> 5. admin/ >>>>> >>>>> The current path, polls/, didn't match any of these. >>>>> >>>>> You're seeing this error because you have DEBUG = True in your Django >>>>> settings file. Change that to False, and Django will display a >>>>> standard 404 page. >>>>> >>>>> -- >>>>> 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/54b07f4e-663c-4ed0-a419-541d735148a1%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/django-users/54b07f4e-663c-4ed0-a419-541d735148a1%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/0d8bf4ad-99dc-4c0e-8341-1084e15daf75%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/0d8bf4ad-99dc-4c0e-8341-1084e15daf75%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/CA%2Bfs_csn_q6ZhQ2ui%3DSd8rk8zgKXKRJs2kYnzyAAR-AuAfEkyQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CA%2Bfs_csn_q6ZhQ2ui%3DSd8rk8zgKXKRJs2kYnzyAAR-AuAfEkyQ%40mail.gmail.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 a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/IbThyW5L5mw/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAPkbFbZV%3DOBdaNirddXE1zwbR3CnLvYSCZcZJviHmiXOM6y8tw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPkbFbZV%3DOBdaNirddXE1zwbR3CnLvYSCZcZJviHmiXOM6y8tw%40mail.gmail.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/CAEx5wm6%3DKDB4CW6fJ5RhK1px%3Dz7%3DgJfnP%2B-MSp%2B1zs0nfPYKUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

