Search code examples
pythonpython-3.xdjangodjango-templatesdjango-template-filters

How to get the domain name of my site within a Django template?


How do I get the domain name of my current site from within a Django template? I've tried looking in the tag and filters but nothing there.


Solution

  • I think what you want is to have access to the request context, see RequestContext.