Not sure why this doesn’t match any urls in urls.py. I checked with a regex checker and it should be correct.
urls.py:
url(r'^toggle_fave/\?post_id=(?P<post_id>\d+)$', 'core.views.toggle_fave', name="toggle_fave"),
sample url:
http://localhost:8000/toggle_fave/?post_id=7
Checked using this simple regex checked. Seems right. Any ideas?
Thanks!
the urlconf isn’t used to match the request.GET parameters of your url. You do that within the view.
you either want your urls to look like this:
and match it using:
with your view that looks like:
or
and your urls.py:
and views.py: