allow pages to specify different templates

This commit is contained in:
2021-04-30 19:32:06 -05:00
parent f4beb15a3b
commit e8377adcf5
5 changed files with 62 additions and 1 deletions

View File

@@ -193,3 +193,13 @@ def test_setting_selected_style_includes_cookie(client):
assert b'dark.css' in response.data
assert b'light.css' not in response.data
assert style_cookie.value == 'dark'
def test_pages_can_supply_alternate_templates(client):
"""Test that pages can supply templates other than the default."""
response = client.get('/')
assert b'class="site-wrap"' in response.data
assert b'class="wide-site-wrap"' not in response.data
response = client.get('/custom-template')
assert b'class="site-wrap"' not in response.data
assert b'class="wide-site-wrap"' in response.data

View File

@@ -0,0 +1,3 @@
Template: base-wide.html
testttttttttt