[Answer]-Django url template tag not working

1👍

If you are using Django 1.4, remove the quotes

{% url Customer.views.edit_customer 1 %}

see https://stackoverflow.com/a/4981105/44816

Django 1.5 will accept quoted url matching patterns. You can load the url template tag from future, if you’d like to quote your patterns. Use the following before the first url tag in your templates

{% load url from future %}
👤Enrico

0👍

The reason it didn’t work the way I expected is because I forgot to put in:

{% load url from future %}

I had been using it in most of my templates, but forgot to add it to this one.

P.S. Thanks for the link to that question, it gave me the future answer.

Leave a comment