[Fixed]-How do I get Django multi-argument url tags working?

1👍

Problem with this pattern:

url('^update_rating/(?P<pk>[\w-]+)/(?P<on_title>[True|False])$', views.update_rating, name='update_rating')  

You passed wrong regexp to variables, pk must match integers so \d+ and booleans must match words \w+

url('^update_rating/(?P<pk>\d+)/(?P<on_title>\w+)/$', views.update_rating, name='update_rating')  

Leave a comment