summaryrefslogtreecommitdiff
path: root/frontend/views.py
diff options
context:
space:
mode:
authorroot <root@lalalizard.com>2012-12-16 13:38:33 -0500
committerroot <root@lalalizard.com>2012-12-16 13:38:33 -0500
commit7fc4bccc609583a067913686e3106e311d4f454d (patch)
tree041ad626623941a7b04aa21702bd13e941f73356 /frontend/views.py
parent5ac96fe6a920269695efee990e7fed9ffe83df66 (diff)
fix server_host for html pages
Diffstat (limited to 'frontend/views.py')
-rw-r--r--frontend/views.py14
1 files changed, 8 insertions, 6 deletions
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,
}
)