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)
|
More like this
- Template tag "ifregex" and "ifnotregex" by arthurfurlan 2 years, 11 months ago
- Flatpage Suggester Template tag for 404 templates by bradmontgomery 2 years, 3 months ago
- another request logging middleware with request time and extra info by yoav 5 months, 1 week ago
- Run and cache only one instance of a heavy request by farnsworth 1 year, 9 months ago
- Serve static media files from app/media subdirectory by adamlofts 3 years, 9 months ago
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/] (Documetation / Request+Response)
#
sorry, above URL is broken. This one works:
Documentation / Request+Response
#