If you use this syntax, then no NoReverseMatch exception gets raised:

{% url 'some-url-name' arg arg2 as the_url %}

This is documented here: 
https://docs.djangoproject.com/en/1.9/ref/templates/builtins/#url

> This {% url ... as var %} syntax will not cause an error if the view is 
> missing.
> In practice you’ll use this to link to views that are optional ...

This caused an error on a production system which was not detected in CI.

Is the current implementation really the way you like it?

Do you use the following use case provided in the docs?

> % url 'some-url-name' as the_url %}> {% if the_url %}
>  <a href="{{ the_url }}">Link to optional stuff</a>> {% endif %}

Regards,
  Thomas Güttler

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/74b6df31-916e-4924-acc4-56db553da4db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to