subdomains.templatetags.subdomainurls¶
Resolves a URL in a template, using subdomain-based URL resolution.
If no subdomain is provided and a
requestis in the template context when rendering, the URL will be resolved relative to the current request’s subdomain. If norequestis provided, the URL will be resolved relative to current domain with thesettings.ROOT_URLCONF.Usage:
{% load subdomainurls %} {% url 'view-name' subdomain='subdomain' %}