pythongoogle-app-enginetipfy

Tipfy session Management


def manage_bread_crumb(self, testvar):
 stzr = ''
 if self.session.get('temp_sesison') != None:
  stzr = pickle.loads(str(self.session.get('temp_sesison')))
  string = stzr + testvar
  self.session['temp_sesison'] = pickle.dumps(string)
  self.temp_session = pickle.loads(str(self.session.get('temp_sesison')))

def __init__(self, request):
 RequestHandler.__init__(self, request)
 Jinja2Mixin.__init__(self)
 if self.session.get('profile_user') is not None:
  self.profile_user = pickle.loads(str(self.session.get('profile_user')))
 else:
  self.profile_user = None

 self.temp_session = pickle.loads(str(self.session.get('temp_sesison')))\
   if self.session.get('temp_sesison') else None

I concatenated a string and append it to a session created by tipfy for each and every request. But the session does not get updated.

This is how I call the session in another handler:

 def some_hanlder(self, secure_page_handler):
  self.manage_bread_crumb('some name')
  print self.temp_session 

Can anyone help me?


Solution

  • All I have to do was change the tipfy session management from cookies to memcache . After that it works fine,