Quick and simple, but not good for production:
(in a view)
request.scheme # http or https
request.META['HTTP_HOST'] # example.com
request.path # /some/content/1/
(in a template)
{{ request.scheme }} :// {{ request.META.HTTP_HOST }} {{ request.path }}
Be sure to use a RequestContext, which is the case if you're using render.
Don't trust request.META['HTTP_HOST']
in production: that info comes from the browser. Instead, use @CarlMeyer's answer