<s> """<STR_LIT>""" <EOL> import logging <EOL> import os <EOL> from oauth2client import appengine <EOL> import httplib2 <EOL> import jinja2 <EOL> import webapp2 <EOL> import compute_api_gen <EOL> from oauth2helper import decorator <EOL> import safe_memcache as memcache <EOL> JINJA_ENVIRONMENT = jinja2 . Environment ( <EOL> loader = jinja2 . FileSystemLoader ( os . path . dirname ( __file__ ) ) , <EOL> autoescape = True , <EOL> extensions = [ '<STR_LIT>' ] ) <EOL> class IndexHandler ( webapp2 . RequestHandler ) : <EOL> @ decorator . oauth_aware <EOL> def get ( self ) : <EOL> if not decorator . has_credentials ( ) : <EOL> self . redirect ( decorator . authorize_url ( ) ) <EOL> return <EOL> variables = { } <EOL> template = JINJA_ENVIRONMENT . get_template ( '<STR_LIT>' ) <EOL> self . response . write ( template . render ( variables ) ) <EOL> class RedirectHandler ( webapp2 . RequestHandler ) : <EOL> @ decorator . oauth_aware <EOL> def get ( self , project ) : <EOL> self . redirect ( '<STR_LIT>' % self . request . path ) <EOL> app = webapp2 . WSGIApplication ( <EOL> [ <EOL> webapp2 . Route ( <EOL> '<STR_LIT:/>' , <EOL> IndexHandler ) , <EOL> webapp2 . Route ( <EOL> '<STR_LIT>' , <EOL> RedirectHandler ) , <EOL> ] + compute_api_gen . routes + <EOL> [ <EOL> ( decorator . callback_path , decorator . callback_handler ( ) ) , <EOL> ] , <EOL> debug = True ) </s>
