[Answered ]-Accessing request.META.SERVER_NAME in template


You have to add the request context processor to have it added to the template context automatically. Or you could explicitly add the request to the context dictionary render_to_response('foo', {'request': request})


Note that if you add the request context processor, you should remember to add the defaults as well.

Leave a comment