Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add AppStats

  • Loading branch information...
commit e3423dd53c1288d4e866834ae88d85b350ba7052 1 parent b2c3a40
@dustball dustball authored
Showing with 12 additions and 1 deletion.
  1. +5 −0 app.yaml
  2. +6 −0 appengine_config.py
  3. +1 −1  main.py
View
5 app.yaml
@@ -6,7 +6,12 @@ api_version: 1
inbound_services:
- mail
+builtins:
+- appstats: on
+
handlers:
+- url: /stats.*
+ script: $PYTHON_LIB/google/appengine/ext/appstats/ui.py
- url: /static
static_dir: static
- url: /_ah/queue/deferred
View
6 appengine_config.py
@@ -0,0 +1,6 @@
+
+def webapp_add_wsgi_middleware(app):
+ from google.appengine.ext.appstats import recording
+ app = recording.appstats_wsgi_middleware(app)
+ return app
+
View
2  main.py
@@ -427,7 +427,7 @@ def main():
('/appreciationemail', AppreciationEmailHandler),
('/staffjson', JSONHandler),
], debug=True)
- wsgiref.handlers.CGIHandler().run(application)
+ run_wsgi_app(application)
if __name__ == '__main__':
main()
Please sign in to comment.
Something went wrong with that request. Please try again.