[Django]-Django named routes like Laravel

7👍

Yes, you can:

url(r'^hello/$','article.views.hello', name="hello"),

You would reference it in a template as:

{% url 'hello' %}

For more information, including how to give arguments to a named URL, see here.

Leave a comment