You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/06/03 20:56:26 UTC

[5/7] git commit: [#6325] updated doc to reflect defaults

[#6325] 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/724f5a8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/724f5a8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/724f5a8a

Branch: refs/heads/cj/6325
Commit: 724f5a8a4831e2df23e3def6206eb8bac9b0d798
Parents: e9ede9e
Author: Nicholas Bollweg (Nick) <ni...@gmail.com>
Authored: Wed Mar 7 16:04:33 2012 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 18:55:52 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/724f5a8a/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: