Plz I need ur help, I found this error TemplateDoesNotExit at polls/1/
On May 22, 2018 6:29 PM, "김영찬" <garson1362@gmail.com> 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 <avitabayans@gmail.com>님이 작성:Mysite\urls.py:--from django.contrib import adminfrom django.urls import include, pathurlpatterns = [path('', include('polls.urls')),path('admin/', admin.site.urls),]polls\urls.py:from django.urls import pathfrom . import viewsapp_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 fileOn Fri, May 18, 2018 at 10:05 AM Avitab Ayan Sarmah <avita...@gmail.com> 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:
- [name='index']
- <int:pk>/ [name='detail']
- <int:pk>/results/ [name='results']
- <int:question_id>/vote/ [name='vote']
- admin/
The current path,
polls/, didn't match any of these.You're seeing this error because you have
DEBUG = Truein your Django settings file. Change that toFalse, 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 django-users...@googlegroups.com .
To post to this group, send email to django...@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/54b07f4e- .663c-4ed0-a419-541d735148a1% 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/0d8bf4ad- .99dc-4c0e-8341-1084e15daf75% 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/CA%2Bfs_ .csn_q6ZhQ2ui% 3DSd8rk8zgKXKRJs2kYnzyAAR- AuAfEkyQ%40mail.gmail.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/CAPkbFbZV%3DOBdaNirddXE1zwbR3CnLvYSCZcZJviHmiXOM6y8tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment