changeset 1788:67613823870c gae

move appengine_main module to MoinMoin package this way, the toplevel directory is less cluttered.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Sep 2012 00:24:45 +0200
parents a3422584548a
children 5ddb2c35a886
files MoinMoin/appengine_main.py app.yaml appengine_main.py
diffstat 3 files changed, 17 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/appengine_main.py	Sat Sep 22 00:24:45 2012 +0200
@@ -0,0 +1,16 @@
+"""Main entry point for Google App Engine."""
+
+import os
+import sys
+
+support_path = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'support'))
+if support_path not in sys.path:
+    sys.path.insert(0, support_path)
+
+# Hack: If there are no DatastoreFile instances assume we must create the index.
+from whoosh.filedb.gae import DatastoreFile
+create_index = DatastoreFile.all().get() is None
+
+# Create the WSGI application object.
+from MoinMoin.app import create_app
+application = create_app(create_index=create_index)
--- a/app.yaml	Sat Sep 22 00:08:56 2012 +0200
+++ b/app.yaml	Sat Sep 22 00:24:45 2012 +0200
@@ -9,7 +9,7 @@
 
 handlers:
 - url: /.*
-  script: appengine_main.application
+  script: MoinMoin.appengine_main.application
 
 libraries:
 - name: jinja2
--- a/appengine_main.py	Sat Sep 22 00:08:56 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-"""Main entry point for Google App Engine."""
-
-# Python imports.
-import os
-import sys
-
-# Tweak sys.path.
-support_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'support'))
-if support_path not in sys.path:
-    sys.path.insert(0, support_path)
-
-# Now we can import MoinMoin.
-from MoinMoin.app import create_app
-
-# Hack: If there are no DatastoreFile instances assume we must create the index.
-from whoosh.filedb.gae import DatastoreFile
-create_index = DatastoreFile.all().get() is None
-
-# Create the WSGI application object.
-application = create_app(create_index=create_index)