Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2521CF91 for ; Mon, 3 Jun 2013 18:56:22 +0000 (UTC) Received: (qmail 42778 invoked by uid 500); 3 Jun 2013 18:56:22 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 42739 invoked by uid 500); 3 Jun 2013 18:56:22 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 42656 invoked by uid 99); 3 Jun 2013 18:56:22 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 18:56:22 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 71F5281287A; Mon, 3 Jun 2013 18:56:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Date: Mon, 03 Jun 2013 18:56:26 -0000 Message-Id: <60a6106c48a5490d96050bb6cb49e093@git.apache.org> In-Reply-To: <624671d8ce654edabb7f5f5488abbb7a@git.apache.org> References: <624671d8ce654edabb7f5f5488abbb7a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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) Authored: Wed Mar 7 16:04:33 2012 -0500 Committer: Cory Johns 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: