I call a template like this from my view:
return render_to_response('mytemplate.html', context_instance=RequestContext(request))
I'm trying to access the hostname of my current server (in this case, localhost
), but it just prints blank when I place {{request.META.SERVER_NAME}}
in the template.
In my settings.py
file, I don't have any TEMPLATE_CONTEXT_PROCESSORS
defined. I'm not sure if I need to specify anything there, or if that could solve the problem.