On Wed, Feb 19, 2020 at 4:47 AM DamnGeniuses' Squad < andhikaravelen...@gmail.com> wrote:
> NoReverseMatch at /polls/1/ > > Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: > ['polls/(?P<question_id>[0-9]+)/vote/$'] > > Request Method: GET > Request URL: http://127.0.0.1:8000/polls/1/ > Django Version: 3.0.3 > Exception Type: NoReverseMatch > Exception Value: > > Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: > ['polls/(?P<question_id>[0-9]+)/vote/$'] > > Exception Location: > C:\Users\Andhika\AppData\Local\Programs\Python\Python38\lib\site-packages\django\urls\resolvers.py > in _reverse_with_prefix, line 677 > Python Executable: > C:\Users\Andhika\AppData\Local\Programs\Python\Python38\python.exe > Python Version: 3.8.1 > Python Path: > > ['E:\\TestingKetiga-2\\mysite', > > 'C:\\Users\\Andhika\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip', > 'C:\\Users\\Andhika\\AppData\\Local\\Programs\\Python\\Python38\\DLLs', > 'C:\\Users\\Andhika\\AppData\\Local\\Programs\\Python\\Python38\\lib', > 'C:\\Users\\Andhika\\AppData\\Local\\Programs\\Python\\Python38', > 'C:\\Users\\Andhika\\AppData\\Roaming\\Python\\Python38\\site-packages', > > 'C:\\Users\\Andhika\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages'] > > Server time: Wed, 19 Feb 2020 09:56:21 +0000 > Error during template rendering > > In template E:\TestingKetiga-2\mysite\polls\templates\polls\detail.html, > error at line *5* > Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: > ['polls/(?P<question_id>[0-9]+)/vote/$'] > 1 <h1>{{ question.question_text }}</h1> > 2 > 3 {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% > endif %} > 4 > 5 <form action="{% url 'polls:vote' question.id %}" method="post"> > 6 {% csrf_token %} > 7 {% for choice in question.choice_set.all %} > 8 <input type="radio" name="choice" id="choice{{ forloop.counter }}" > value="{{ choice.id }}"> > 9 <label for="choice{{ forloop.counter }}">{{ choice.choice_text > }}</label><br> > 10 {% endfor %} > 11 <input type="submit" value="Vote"> > 12 </form> > Please help me fix this , i want to learn more about Django , but i > already searching for 3 hours but got no solution yet > Thankyouu > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/b5374455-e259-4ac7-b16d-2b55c8dd6924%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/b5374455-e259-4ac7-b16d-2b55c8dd6924%40googlegroups.com?utm_medium=email&utm_source=footer> > . > Would you be able to show us your polls/urls.py and your mysite/urls.py please? -Jorge -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANfN%3DK-v801hrCxQ%2B6Em_Wfu%3D5p8ZYw9xZHOoA_jN7x3Y0_WFg%40mail.gmail.com.