```
from django.urls import path
from django.contrib import admin
from . import views
urlpatterns = [
#es: /polls/
path('', views.index, name='index'),
# ex: /polls/5
path('<int:question_id>/', views.detail, name='detail'),
# ex: /polls/5/results/
path('<int:question_id>/results', views.results, name='results'),
#ex: /polls/5/votes
path('<int:question_id>/votes/', views.votes, name='votes'),
]
from django.contrib import admin
from . import views
urlpatterns = [
#es: /polls/
path('', views.index, name='index'),
# ex: /polls/5
path('<int:question_id>/', views.detail, name='detail'),
# ex: /polls/5/results/
path('<int:question_id>/results', views.results, name='results'),
#ex: /polls/5/votes
path('<int:question_id>/votes/', views.votes, name='votes'),
]
```
The error message shows that there is a match. What am I doing wrong?
```
Using the URLconf defined in maturedj.urls, Django tried these URL patterns, in this order:
- polls/ [name='index']
- polls/ <int:question_id>/ [name='detail']
- polls/ <int:question_id>/results [name='results']
- polls/ <int:question_id>/votes/ [name='votes']
- admin/
The current path, polls/3/detail, didn't match any of these.
```
obviously, there is a match
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d5103e1a-07d0-4533-ad66-b9575e067c2en%40googlegroups.com.
No comments:
Post a Comment