How to generate urls in django

If you need to use something similar to the {% url %} template tag in your code, Django provides the django.core.urlresolvers.reverse(). The reverse function has the following signature:

reverse(viewname, urlconf=None, args=None, kwargs=None)

https://docs.djangoproject.com/en/dev/ref/urlresolvers/

At the time of this edit the import is django.urls import reverse

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)