. , App Engine ... .
import webapp2, urllib, logging, json, os
dp = os.path.dirname(os.path.realpath(__file__))
fp = os.path.join(dp, "resources", 'index.html')
w = open(fp, 'r').read()
class Fragment(webapp2.RequestHandler):
def get(self, pathname):
if '_escaped_fragment_' in self.request.arguments():
CODE_GOES_HERE_FOR_BUILDING_YOUR_FRAGMENT_RESPONSE
else:
self.response.write(w)
application = webapp2.WSGIApplication(
[('/(.*)', Fragment)],
debug=True)
, _escaped_fragment_ . , ( ), index.html static_files: app.yaml.