def _get_cookie_settings(request):
 if request.session.get_expire_at_browser_close():
  max_age = None
  expires = None
 else:
  max_age = request.session.get_expiry_age()
  expires_time = (time.time() + max_age)
  expires = cookie_date(expires_time)
 cookie_settings = {u'max_age': max_age, u'expires': expires, u'domain': settings.SESSION_COOKIE_DOMAIN, u'path': u'/', u'httponly': None}
 return cookie_settings

def _get_cookie_settings ( request ) : if request . session . get_expire_at_browser_close ( ) : max_age = None expires = None else : max_age = request . session . get_expiry_age ( ) expires_time = ( time . time ( ) + max_age ) expires = cookie_date ( expires_time ) cookie_settings = { u'max_age' : max_age , u'expires' : expires , u'domain' : settings . SESSION_COOKIE_DOMAIN , u'path' : u'/' , u'httponly' : None } return cookie_settings
returns the common cookie settings .