Hi - I could not find any explanation that fixed the problem, until I ran across this person's abridged Django tutorial: http://tony.abou-assaleh.net/web-development/stripped-down-django-tutorial
It's basically a line in the details template, which should be: <form action="/polls/{{ poll.id }}/vote/" method="post"> Instead of: <form action="{% url 'polls.views.vote' poll.id %}" method="post"> I'm not sure why this fixed the issue, but it did for me. I'd love an explanation if anyone has one. Thanks, Syam On Thursday, June 9, 2011 12:28:30 AM UTC-7, bh.hoseini wrote: > > hi there, > this is my views.py that doesn't have any problem: > > from django.shortcuts import get_object_or_404, render_to_response > from django.core.urlresolvers import reverse > . > . > . > return HttpResponseRedirect(reverse('polls.views.results', args=( > p.id,))) > > def results(request, poll_id): > p = get_object_or_404(Poll, pk=poll_id) > return render_to_response('(...)/polls/results.html', {'poll': p}) > > ---------------------------------------------------------------------------------------------------------------- > but when i edit my urls.py like this: > > #... > urlpatterns = patterns('', > (r'^$', > ListView.as_view( > queryset=Poll.objects.order_by('-pub_date')[:5], > context_object_name='latest_poll_list', > template_name='(...)polls/index.html')), > (r'^(?P<pk>\d+)/$', > DetailView.as_view( > model=Poll, > template_name='(...)polls/detail.html')), > url(r'^(?P<pk>\d+)/results/$', > DetailView.as_view( > model=Poll, > template_name='(...)polls/results.html'), > name='poll_results'), > (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'), > > ------------------------------------------------------------------------------------------------------------------ > and open my browser with the link (http://localhost:8000/polls/id=1/vote), > I'd face this error: can anybody help please? > > Reverse for 'polls.views.results' with arguments '(id=1,)' and keyword > arguments '{}' not found. > > can anybody help? > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/2MW2j_RVlfYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.