On every request to an /org route, read the token cookie in the request object, pass it through process_oauth_token, and use the returned Google ID to look up an Org object and generate the appropriate view. Since this happens on several routes, it might make sense to abstract it into a separate function.
On every request to an
/org
route, read the token cookie in the request object, pass it throughprocess_oauth_token
, and use the returned Google ID to look up an Org object and generate the appropriate view. Since this happens on several routes, it might make sense to abstract it into a separate function.