Cleaned up the webclient and changed how it handles sessions and identifies with the server. Fixed some reported bugs caused by the changed layout of sessionhandler.

This commit is contained in:
Griatch 2010-12-11 13:37:26 +00:00
parent b1682f78c9
commit 0eb5d29560
16 changed files with 191 additions and 107 deletions

View file

@ -8,8 +8,7 @@ page and serve it eventual static content.
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.conf import settings
from src.server import sessionhandler
from src.config.models import ConfigValue
from src.server.sessionhandler import SESSIONS
def webclient(request):
"""
@ -17,7 +16,7 @@ def webclient(request):
"""
# as an example we send the number of connected players to the template
pagevars = {'num_players_connected': ConfigValue.objects.conf('nr_sessions')}
pagevars = {'num_players_connected': SESSIONS.player_count()}
context_instance = RequestContext(request)
return render_to_response('webclient.html', pagevars, context_instance)