Let the base.mak template be overrideable by Pyramid's API
authorKarl O. Pinc <kop@meme.com>
Wed, 24 Oct 2018 03:10:52 +0000 (22:10 -0500)
committerKarl O. Pinc <kop@meme.com>
Wed, 24 Oct 2018 03:10:52 +0000 (22:10 -0500)
src/pgwui_common/configure.py
src/pgwui_common/templates/auth_base.mak

index 52c820fb727bd4272e941e34964ce8c85ec1885d..d8103a80d1622a4ea4805fa646cfd7caf9a9d580 100644 (file)
@@ -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).
+
 '''
 
 
index 367e738b915d22d8a9a7da7a96c03838cd728307..1cafb4307453d590967007b89ccd6a73401569e1 100644 (file)
     null_rep
 </%doc>
 
-<%inherit file="base.mak" />
+<%!
+    from pyramid.path import AssetResolver
+
+    asset_resolver = AssetResolver()
+%>
+
+<%inherit file="${asset_resolver.resolve('templates/base.mak')}" />
 
 <%def name="navbar()">
   <p class="navbar">