예제 #1
0
    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='/')
예제 #2
0
    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='/')
예제 #3
0
 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 = '/'
     )
예제 #4
0
 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 = '/'
     )