V
V
Vladimir Kuts2016-04-07 11:04:24
Django
Vladimir Kuts, 2016-04-07 11:04:24

Multiple options in django template?

I'm trying to construct a url in a template

<a href="{% url 'some_namespace:some_urlname' model_name=app.classname,app_name=app.appname %}">

Django complains:
TemplateSyntaxError at /admin/audit/
Could not parse the remainder: ',app_name=app.appname' from 'app.classname,app_name=app.appname'
doesn't seem to want to parse the second parameter.
Attention the question is - how to pass two parameters to the URL without making crutches?
If you remove the second parameter - everything works.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marazmiki, 2016-04-07
@fox_12

Try to list the parameters with a space, not with a comma.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question