incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [14/27] git commit: [#6325] updated doc to reflect defaults
Date Fri, 07 Jun 2013 23:42:09 GMT
[#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/b2093dbb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b2093dbb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b2093dbb

Branch: refs/heads/db/6276
Commit: b2093dbb9da36f2276c9b7f616f1ce2c3460195b
Parents: a82cbb5
Author: Nicholas Bollweg (Nick) <nick.bollweg@gmail.com>
Authored: Wed Mar 7 16:04:33 2012 -0500
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Tue Jun 4 20:51:31 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/b2093dbb/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