python - Django NoReverseMatch wrong number of arguments -


i getting noreversematch error after having added new argument 1 of urls. initially, url in urlpatterns had been

url(r'^(?p<myid>[0-9]+)/go/(?p<otherid>[0-9]+)/$', views.go, name='go') 

and worked. changed

url(r'^(?p<myid>[0-9]+)/go/(?p<listid>[0-9]+)/(?p<otherid>[0-9]+)/$', views.go, name='go') 

and updated function go in views.py accept argument (def go(request,myid,listid,otherid):#...). new argument not being recognized. when try go my_app/18/go/14/12/ (for example) local server gives error

reverse 'go' arguments '(18, 12)' , keyword arguments '{}' not found. 1 pattern(s) tried: ['frackr/(?p<myid>[0-9]+)/go/(?p<listid>[0-9]+)/(?p<otherid>[0-9]+)/$'] 

so seems not recognize listid argument. however, debugging message says 1 of local variables in view function listid value of u'14'. problem not seem coming interpreting url.

i have looked through tons of questions try figure out, no 1 seems have same problem. , realize beginner's mistake, appreciated.

your error isn't related function arguments. explicitly states error reverse error.

the traceback tell reverse called from, , function needs updated use 3 arguments, not 2.

it reverse() call directly in python, {% url %} via template, get_absolute_url wrong parameters, etc., traceback tell where.


Comments