<s> import cgi <EOL> import wsgiref . handlers <EOL> from datetime import datetime <EOL> import os <EOL> from models import Server <EOL> from google . appengine . ext import webapp <EOL> from google . appengine . api import users <EOL> from google . appengine . ext import db <EOL> from google . appengine . ext . webapp import template <EOL> class MainHandler ( webapp . RequestHandler ) : <EOL> def get ( self ) : <EOL> serverlist = db . GqlQuery ( "<STR_LIT>" ) <EOL> user = users . get_current_user ( ) <EOL> template_values = { '<STR_LIT:user>' : user , '<STR_LIT>' : serverlist , } <EOL> path = os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> self . response . out . write ( template . render ( path , template_values ) ) <EOL> def main ( ) : <EOL> application = webapp . WSGIApplication ( [ ( '<STR_LIT:/>' , MainHandler ) ] , <EOL> debug = True ) <EOL> wsgiref . handlers . CGIHandler ( ) . run ( application ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
