urls.reverse()

reverse(viewname, urlconf=None, args=None, kwargs=None, current_app=None) [source] viewname can be a URL pattern name or the callable view object. For example, given the following url: from news import views url(r'^archive/$', views.archive, name='news-archive') you can use any of the following to reverse the URL: # using the named URL reverse('news-archive') # passing a callable object # (This is discouraged because you can't reverse namespaced views this way.) from news import views rev

urls.ResolverMatch.view_name

view_name The name of the view that matches the URL, including the namespace if there is one.

urls.ResolverMatch.url_name

url_name The name of the URL pattern that matches the URL.

urls.ResolverMatch.namespaces

namespaces The list of individual namespace components in the full instance namespace for the URL pattern that matches the URL. i.e., if the namespace is foo:bar, then namespaces will be ['foo', 'bar'].

urls.ResolverMatch.namespace

namespace The instance namespace for the URL pattern that matches the URL.

urls.ResolverMatch.kwargs

kwargs The keyword arguments that would be passed to the view function, as parsed from the URL.

urls.ResolverMatch.func

func The view function that would be used to serve the URL

urls.ResolverMatch.args

args The arguments that would be passed to the view function, as parsed from the URL.

urls.ResolverMatch.app_names

app_names New in Django 1.9. The list of individual namespace components in the full application namespace for the URL pattern that matches the URL. For example, if the app_name is 'foo:bar', then app_names will be ['foo', 'bar'].

urls.ResolverMatch.app_name

app_name The application namespace for the URL pattern that matches the URL.