[google-app-engine-oil] push by ericsk - Fix the wrong path of routes.yaml.... on 2010-12-22 07:13 GMT

4 views
Skip to first unread message

google-app...@googlecode.com

unread,
Dec 22, 2010, 2:14:02 AM12/22/10
to google-app...@googlegroups.com
Revision: 3d30d7218e
Author: Lin-Chieh Shangkuan <eri...@gmail.com>
Date: Tue Dec 21 23:12:47 2010
Log: Fix the wrong path of routes.yaml.
Change the DEBUG flag to True by default.
Add ROOT_PATH in settings.
http://code.google.com/p/google-app-engine-oil/source/detail?r=3d30d7218e

Modified:
/oildrum/lib/gaeo/app.py
/oildrum/settings-sample.py

=======================================
--- /oildrum/lib/gaeo/app.py Fri Nov 26 07:12:06 2010
+++ /oildrum/lib/gaeo/app.py Tue Dec 21 23:12:47 2010
@@ -322,7 +322,7 @@
def _init_router(self):
"""Initializes the router's routing rules."""
the_router = router.Router()
- route_config = yaml.safe_load(file('routes.yaml'))
+ route_config =
yaml.safe_load(file(os.path.join(settings.ROOT_PATH, 'routes.yaml')))
for route in route_config.get('routes', []):
pattern = route.get('rule', '')
matches = route.get('regex', [])
=======================================
--- /oildrum/settings-sample.py Tue Nov 23 07:31:42 2010
+++ /oildrum/settings-sample.py Tue Dec 21 23:12:47 2010
@@ -5,17 +5,16 @@

import os

-cur_path = os.path.dirname(__file__)
-
# General
-DEBUG = False
+DEBUG = True
+ROOT_PATH = os.path.dirname(__file__)
APP_DIR = 'application'
-APP_PATH = os.path.join(cur_path, APP_DIR)
+APP_PATH = os.path.join(ROOT_PATH, APP_DIR)
TEMPLATE_DIR = 'templates'
-TEMPLATE_PATH = os.path.join(cur_path, APP_DIR, TEMPLATE_DIR)
+TEMPLATE_PATH = os.path.join(ROOT_PATH, APP_DIR, TEMPLATE_DIR)
PLUGIN_DIR = 'plugins'
PLUGIN_FILTERS_DIR = 'filters'
-PLUGIN_FILTERS_PATH = os.path.join(cur_path, PLUGIN_DIR,
PLUGIN_FILTERS_DIR)
+PLUGIN_FILTERS_PATH = os.path.join(ROOT_PATH, PLUGIN_DIR,
PLUGIN_FILTERS_DIR)
CACHE_TIMEOUT = 3600

# Session

Reply all
Reply to author
Forward
0 new messages