urls.ResolverMatch.namespace

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

urls.ResolverMatch.view_name

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

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.reverse_lazy()

reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None) It is useful for when you need to use a URL reversal before your project’s URLConf is loaded. Some common cases where this function is necessary are: providing a reversed URL as the url attribute of a generic class-based view. providing a reversed URL to a decorator (such as the login_url argument for the django.contrib.auth.decorators.permission_required() decorator). providing a reversed URL as a default value f

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.func

func The view function that would be used to serve 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.args

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

urls.resolve()

resolve(path, urlconf=None) [source] path is the URL path you want to resolve. As with reverse(), you don’t need to worry about the urlconf parameter. The function returns a ResolverMatch object that allows you to access various metadata about the resolved URL. If the URL does not resolve, the function raises a Resolver404 exception (a subclass of Http404) .

urls.ResolverMatch.kwargs

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