diff options
| author | root <root@lalalizard.com> | 2012-12-16 13:38:33 -0500 |
|---|---|---|
| committer | root <root@lalalizard.com> | 2012-12-16 13:38:33 -0500 |
| commit | 7fc4bccc609583a067913686e3106e311d4f454d (patch) | |
| tree | 041ad626623941a7b04aa21702bd13e941f73356 /frontend | |
| parent | 5ac96fe6a920269695efee990e7fed9ffe83df66 (diff) | |
fix server_host for html pages
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/templates/profile.html | 2 | ||||
| -rw-r--r-- | frontend/templates/roomlist.html | 2 | ||||
| -rw-r--r-- | frontend/views.py | 14 |
3 files changed, 10 insertions, 8 deletions
diff --git a/frontend/templates/profile.html b/frontend/templates/profile.html index 8d1e4aa..7deb845 100644 --- a/frontend/templates/profile.html +++ b/frontend/templates/profile.html @@ -117,7 +117,7 @@ </body> <script type="text/javascript">document.getElementById("plea").style.display="none"</script> <script type="text/javascript"> - serverHost = "scannerjammer.fm" + serverHost = "{{SERVER_HOST}}" serverPort = 80 var userVideoQueue = {{VIDZ|safe}} var userVideoQueueTitle = "my scans" diff --git a/frontend/templates/roomlist.html b/frontend/templates/roomlist.html index 94b3f63..071f4d0 100644 --- a/frontend/templates/roomlist.html +++ b/frontend/templates/roomlist.html @@ -66,7 +66,7 @@ </section> </body> <script type="text/javascript"> - var serverHost = "scannerjammer.fm"; + var serverHost = "{{SERVER_HOST}}"; var serverPort = 80; var ROOM_LIST = {{ROOM_LIST|safe}}; </script> diff --git a/frontend/views.py b/frontend/views.py index 9fec138..9285a35 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -65,7 +65,7 @@ def bg(request): return render_to_response( 'backgrounds.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, 'lowest_id': backgrounds[limit - 1].id, 'backgrounds': filtered_backgrounds, @@ -87,7 +87,7 @@ def topvideos(request): response = render_to_response( 'topvideos.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, 'top_today': json.dumps(videos_response_list(top_today)), 'top_yesterday': json.dumps(videos_response_list(top_yesterday)), @@ -107,7 +107,7 @@ def directory(request): response = render_to_response( 'directory.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, 'directory': json.dumps(r), } @@ -155,7 +155,7 @@ def profile(request, username): response = render_to_response( 'profile.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, 'NAME': userprofile.nickname, 'UCNAME': userprofile.nickname.upper(), @@ -187,6 +187,8 @@ def roomlist(request): response = render_to_response( 'roomlist.html', { + 'SERVER_HOST': request.get_host(), + 'SERVER_PORT': settings.SERVER_PORT, 'ROOM_LIST': json.dumps(roomlist), } ) @@ -215,7 +217,7 @@ def room(request, roomname): response = render_to_response( 'room.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, 'JS_PATH': jsPath, 'ROOM': sjroom.name.lower(), @@ -231,7 +233,7 @@ def faq(request): response = render_to_response( 'faq.html', { - 'SERVER_HOST': settings.SERVER_HOST, + 'SERVER_HOST': request.get_host(), 'SERVER_PORT': settings.SERVER_PORT, } ) |
