This should be a super simple one. I'm pretty sure that I've used this context successfully in the past in my templates for linking purposes. My belief was that this was built into the RequestContext instance somehow or other.
the SITE_ID record in my settings file is correct. I've included a RequestContext instance for all my views and i have included the contrib.auth app, which may be relevant in this case.
Is the {{site}} context somehow built in or should I query the Sites object for the instance?
thanks all, Brendan
Django strives to be explicit, so it is unlikely that it would set any context by it self. There has to be context processor which sets
{{site}}
insettings.CONTEXT_PROCESSORS
. I've checkeddjango.core.context_processors
anddjango.contrib.sites
and there is no such processor which setssite
. So you probably had a third-party context processor which does that.It is very easy to write context processor: