''' Created on Apr 5, 2012 @author: leifj ''' def get_full_path(request,path=None): if path == None: path = request.path full_path = ('http', ('', 's')[request.is_secure()], '://', request.META['HTTP_HOST'], path) return ''.join(full_path)