Django Version:1.5.2Exception Type:NoReverseMatchException Value:

Reverse for 'gradingstudent' with arguments '()' and keyword arguments 
'{u'student_id': None, u'school_id': 1}' not found.

Exception 
Location:/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py 
in render, line 424Python Executable:/usr/bin/pythonPython Version:2.7.4
 I am new to Django. I got this error and struggle to find a solution for 
it but no luck. Please help!

View.py   def grading_student(request, school_id=1, student_id=1):
urls.py 
  url(r'^(?P<school_id>\d+)/gradings/gradingstudent/(?P<student_id>\d+)/$', 
views.grading_student, name='gradingstudent'),

from template :
if I use :
a href="{% url 'contest:gradingstudent'  school_id=1 student_id=1 %}"> 
 Enter Student Score </a
It work. But when I try to replace 1 by form.instance.id i got error about.

 a href="{% url 'contest:gradingstudent'  school_id=1 
student_id=form.instance.id %}">  Enter Student Score </a

if I change to this url

 a href="{% url 'contest:gradingstudent'  school_id=1 student_id %}"> 
{{form.instance.id}}  Enter Student Score </a
I got other error 

Don't mix *args and **kwargs in call to reverse()!

What is the properway to do?


Thanks,

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to