In Django, inside a template, I do
{% url 'Customer.views.edit_customer' 1 %}
and I get a NoReverseMatch
exception. However, in the line before the template render I do:
print reverse('Customer.views.edit_customer', args=(1,))
and it prints the expected URL. I know I can always just pass in the result of reverse, but I would like to understand what's going on.
The url pattern is:
url(r'^customer/edit/(\d+)$', edit_customer),
Is there a way of doing the equivalent of the reverse call in the template?