From 1adcb98f11b68bd00ccd3244128d50f01f7d8b36 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 29 Mar 2017 00:21:10 -0500 Subject: [PATCH] Various template standardization tweaks --- tailbone/app.py | 4 +++- tailbone/templates/about.mako | 2 +- tailbone/templates/themes/better/base.mako | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tailbone/app.py b/tailbone/app.py index e7d1008d..ab96fa7f 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -173,7 +173,9 @@ def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ - settings.setdefault('mako.directories', ['tailbone:templates']) + settings.setdefault('mako.directories', [ + 'tailbone:templates/themes/better', + 'tailbone:templates']) rattail_config = make_rattail_config(settings) pyramid_config = make_pyramid_config(settings) pyramid_config.include('tailbone') diff --git a/tailbone/templates/about.mako b/tailbone/templates/about.mako index d85b7950..20ac3428 100644 --- a/tailbone/templates/about.mako +++ b/tailbone/templates/about.mako @@ -1,7 +1,7 @@ ## -*- coding: utf-8 -*- <%inherit file="/base.mako" /> -<%def name="title()">About ${project_title} +<%def name="title()">About ${self.app_title()}

${project_title} ${project_version}

diff --git a/tailbone/templates/themes/better/base.mako b/tailbone/templates/themes/better/base.mako index 184d840f..c0f4546c 100644 --- a/tailbone/templates/themes/better/base.mako +++ b/tailbone/templates/themes/better/base.mako @@ -102,7 +102,9 @@ -<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}Rattail +<%def name="app_title()">Rattail + +<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}${self.app_title()} <%def name="content_title()">

${self.title()}