I am not sure what is the difference between {% url url_name %} and {% url ‘url_name’ %}. Why is there such a difference. When to use what? Need some clarification on that… Thanks..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As of django 1.5
{% url url_name %}would treat the argument as a context variable, whereas{% url 'url_name' %}would give you the url named ‘url_name’. In prior versions, the latter syntax is wrong, and won’t work.