Commits

Yu-Jie Lin committed d01cdd5

Using Python 2.7 runtime

Comments (0)

Files changed (3)

 application: gaewiki-demo
 version: 1
-runtime: python
+runtime: python27
+threadsafe: yes
 api_version: 1
 
+default_expiration: "7d"
+
 handlers:
 - url: /gae-wiki-static/
   static_dir: gaewiki/static
   static_files: gaewiki/static/favicon.ico
   upload: gaewiki/static/favicon.ico
 - url: .*
-  script: gaewiki
+  script: gaewiki.application
 
-#- url: /static/
-#  static_dir: static
-#- url: .*
-#  script: handlers.py
-
-builtins:
-- datastore_admin: on
+libraries:
+- name: django
+  version: "1.2"

gaewiki/__init__.py

 import sys
 import wsgiref.handlers
 
-from google.appengine.dist import use_library
-use_library('django', '1.2')
 
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import template
 application = webapp.WSGIApplication(handlers.handlers)
 
 
-def main():
-    run_wsgi_app(application)
-
-
-if __name__ == "__main__":
-    sys.path.insert(0, os.path.dirname(__file__))
-    template.register_template_library('templatetags.filters')
-
-    main()
+sys.path.insert(0, os.path.dirname(__file__))
+template.register_template_library('templatetags.filters')

gaewiki/templatetags/filters.py

 # encoding=utf-8
 
-from google.appengine.dist import use_library
-use_library('django', '1.2')
 from google.appengine.ext.webapp import template
 
 from pytz.gae import pytz