diff options
Diffstat (limited to 'src/meetingtools/utils.py')
-rw-r--r-- | src/meetingtools/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/meetingtools/utils.py b/src/meetingtools/utils.py index cadfb36..eee0d80 100644 --- a/src/meetingtools/utils.py +++ b/src/meetingtools/utils.py @@ -14,4 +14,7 @@ def session(request,key=None,val=None): request.session[key] = None return request.session[key] else: - return request.session
\ No newline at end of file + return request.session + +def base_url(request): + return "%s://%s/" % ({True: 'https',False:'http'}[request.is_secure()],request.get_host())
\ No newline at end of file |