def browser_sessid(session, *args, **kwargs):
 if (not session.browserid):
  print 'stored browserid:', session, args[0]
  session.browserid = args[0]
  if (not session.logged_in):
   browsersession = BrowserSessionStore(session_key=args[0])
   uid = browsersession.get('logged_in', None)
   if uid:
    try:
     player = PlayerDB.objects.get(pk=uid)
    except Exception:
     return
    session.sessionhandler.login(session, player)

def browser_sessid ( session , * args , ** kwargs ) : if ( not session . browserid ) : print 'stored browserid:' , session , args [ 0 ] session . browserid = args [ 0 ] if ( not session . logged_in ) : browsersession = BrowserSessionStore ( session_key = args [ 0 ] ) uid = browsersession . get ( 'logged_in' , None ) if uid : try : player = PlayerDB . objects . get ( pk = uid ) except Exception : return session . sessionhandler . login ( session , player )
this is a utility function for the webclient to communicate its current browser session hash .