S
S
Sergey Nizhny Novgorod2017-07-05 16:08:14
Django
Sergey Nizhny Novgorod, 2017-07-05 16:08:14

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>

And doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2017-07-05
@Terras

Documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question