def remove_cookie(self): ''' Destroys user cookie. ''' response.set_cookie( '__utmb', '', secret=self.COOKIE_SECRET_KEY, #expires = time.time() - ( 3600*24*365 ), #domain = settings.HOST, path='/')
def set_cookie(self, uid): ''' Sets user cookie based on his uid. ''' response.set_cookie( '__utmb', uid, secret=self.COOKIE_SECRET_KEY, expires=datetime.now() + timedelta(days=14), #domain = settings.HOST, path='/')
def remove_cookie( self ): ''' Destroys user cookie. ''' response.set_cookie( '__utmb', '', secret = self.COOKIE_SECRET_KEY, #expires = time.time() - ( 3600*24*365 ), #domain = settings.HOST, path = '/' )
def set_cookie( self, uid ): ''' Sets user cookie based on his uid. ''' response.set_cookie( '__utmb', uid, secret = self.COOKIE_SECRET_KEY, expires = datetime.now() + timedelta(days=14), #domain = settings.HOST, path = '/' )