From: Karl O. Pinc Date: Wed, 24 Oct 2018 03:10:52 +0000 (-0500) Subject: Let the base.mak template be overrideable by Pyramid's API X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=581ad54d5f1d57d385feaaf47edd48bcf27ea79c;p=pgwui_common Let the base.mak template be overrideable by Pyramid's API --- diff --git a/src/pgwui_common/configure.py b/src/pgwui_common/configure.py index 52c820f..d8103a8 100644 --- a/src/pgwui_common/configure.py +++ b/src/pgwui_common/configure.py @@ -30,6 +30,10 @@ following into your package's __init__.py: config = Configurator() config.include('pgwui_common.configure.includeme') +Note that you can override any of the assets in this package or any of +the PGWUI packages, any of the templates or css, using Pyramid's Asset +Override API (or via pyramid.includes = yourextension in the .ini file). + ''' diff --git a/src/pgwui_common/templates/auth_base.mak b/src/pgwui_common/templates/auth_base.mak index 367e738..1cafb43 100644 --- a/src/pgwui_common/templates/auth_base.mak +++ b/src/pgwui_common/templates/auth_base.mak @@ -36,7 +36,13 @@ null_rep -<%inherit file="base.mak" /> +<%! + from pyramid.path import AssetResolver + + asset_resolver = AssetResolver() +%> + +<%inherit file="${asset_resolver.resolve('templates/base.mak')}" /> <%def name="navbar()">