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
- EasyFeed class by limodou 6 years, 2 months ago
- Format transition middleware by limodou 6 years, 2 months ago
- Url filter middleware by limodou 6 years, 2 months ago
- Absolute URL Templatetag by johnboxall 4 years ago
- testdata tag for templates by showell 4 years 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
#