Internal Server Error: /enquete/2/
Traceback (most recent call last):
File "/home/johnl/.local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/johnl/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/johnl/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response
response = response.render()
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/response.py", line 106, in render
self.content = self.rendered_content
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/johnl/.local/lib/python3.6/site-packages/django/template/defaulttags.py", line 442, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/home/johnl/.local/lib/python3.6/site-packages/django/urls/base.py", line 90, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/home/johnl/.local/lib/python3.6/site-packages/django/urls/resolvers.py", line 622, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'vote' with arguments '(2,)' not found. 1 pattern(s) tried: ['enquete\\/\\<int\\:question_id\\/vote\\/$']
[02/Mar/2019 17:18:39] "GET /enquete/2/ HTTP/1.1" 500 112049
^C%
app_name = 'enquete'
urlpatterns = [
path('',views.IndexView.as_view(), name='index'),
path('<int:pk>/',views.DetailView.as_view(),name='detail'),
path('<int:pk>/results',views.ResultsView.as_view(),name='results'),
path('<int:question_id/vote/',views.vote,name='vote'),
]