def add_token_to_response(response, csrf_token=None):
 if csrf_token:
  response.set_cookie('csrf_token', csrf_token, expires=CSRF_TIMEOUT, httponly=False)

def add_token_to_response ( response , csrf_token = None ) : if csrf_token : response . set_cookie ( 'csrf_token' , csrf_token , expires = CSRF_TIMEOUT , httponly = False )
store the latest csrf token as a cookie .