[Answer]-Django url tag and query string


You need to put single quotes around getFormMetaData. Not using quotes was acceptable in previous version of Django, but that has now been deprecated.

Thus, your code should be:

<a href="{% url 'getFormMetaData' %}?code=RHJ6YXZh">Form</a>



I must answer my own question…

Something really not good here…

in that urls.py file i have something like this:

url(r'^main/$', views.main, name='main'),
url(r'^main/getFormMetaData/$', views.getFormMetaData, name='getFormMetaData'),

These url tags i have in main.html. I can access to main.html like this:


Now, how to pass an one or two arguments in getFormMetaData from main.html.. How to wrote url tags?

Leave a comment