1 2 3 | def get_full_path(request): full_path = ('http', ('', 's')[request.is_secure()], '://', request.META['HTTP_HOST'], request.path) return ''.join(full_path) |
1 2 3 | def get_full_path(request): full_path = ('http', ('', 's')[request.is_secure()], '://', request.META['HTTP_HOST'], request.path) return ''.join(full_path) |
Comments
To be a bit more redundant, you could make that:
...or better:
#
Thanks. I lost secure.
#
Current SVN has the method request.build_absolute_uri():
http://www.djangoproject.com/documentation/request_response/
#
sorry, above URL is broken. This one works:
Documentation / Request+Response
#