Answer the question
In order to leave comments, you need to log in
How to pass get parameters to url in Django?
Hello everyone
I can't figure out how to pass get parameters to URl if they are not hardcoded.
Final URL site.ru/coupons?category=1
urls.py
url(r'^coupons$', views.coupons, name='coupons'),
I'm trying to output something like this in html:
<a href="{% url "coupons" category=1 %}">Первая категория</a>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question