incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [27/31] git commit: updated doc to reflect defaults
Date Mon, 03 Jun 2013 15:32:20 GMT
updated doc to reflect defaults


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/da03a223
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/da03a223
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/da03a223

Branch: refs/heads/cj/merge-request-4
Commit: da03a2236a395fa5b7e23a4304781e0ff9616ee8
Parents: d44d7f0
Author: Nicholas Bollweg (Nick) <nick.bollweg@gmail.com>
Authored: Wed Mar 7 16:04:33 2012 -0500
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon Jun 3 15:31:37 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/package_path_loader.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/da03a223/Allura/allura/lib/package_path_loader.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/package_path_loader.py b/Allura/allura/lib/package_path_loader.py
index f09337d..53b6fb7 100644
--- a/Allura/allura/lib/package_path_loader.py
+++ b/Allura/allura/lib/package_path_loader.py
@@ -36,7 +36,8 @@ For the examples, assume the following directory structure:
     |- newtool/
        |- app.py                    <- entry point target here
        |- templates/
-          |- index.html             <- Tool's regular templates
+       |  |- index.html             <- Tool's regular templates
+       |- override                  <- override_root
           |- allura/                <- magic directory named after module
              |- templates/
                 |- repo/
@@ -52,7 +53,7 @@ with the default app_cfg):
 Then, in the neighbor path (see below) for the file containing the
 Tool class, add the following path/file:
 
-    templates/allura/templates/repo/file.html
+    override/allura/templates/repo/file.html
 
 The template will be overridden. Note that after changing
 setup.py, it would be required to re-initialize with setuptools:
@@ -175,8 +176,9 @@ class PackagePathLoader(jinja2.BaseLoader):
                     insert_position = min(sp_location + 1, insert_position)
                 else:
                     # don't know what that is!
-                    raise Exception('Unknown template path rule in %s: %s' % (
-                        overrider, direction))
+                    raise jinja2.TemplateError(
+                        'Unknown template path rule in %s: %s' % (
+                            overrider, direction))
 
             # in the case that we've already replaced a signpost, carry on
             if insert_position is not None:


Mime
View raw message