diff --git a/incorporealcms/config.py b/incorporealcms/config.py index f20dc81..64d7f13 100644 --- a/incorporealcms/config.py +++ b/incorporealcms/config.py @@ -31,3 +31,5 @@ class Config(object): }, }, } + + TITLE_SUFFIX = 'incorporeal.org' diff --git a/incorporealcms/templates/base.html b/incorporealcms/templates/base.html index dddc9dc..95e5756 100644 --- a/incorporealcms/templates/base.html +++ b/incorporealcms/templates/base.html @@ -1,5 +1,5 @@ -{{ title }}{% if title %} - {% endif %}incorporeal.org +{{ title }}{% if title %} - {% endif %}{{ config.TITLE_SUFFIX }}
diff --git a/tests/test_factory.py b/tests/test_factory.py index 92ba443..97f728d 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -11,3 +11,13 @@ def test_config(): instance_path = os.path.join(HERE, 'instance') assert not create_app(instance_path=instance_path).testing assert create_app(instance_path=instance_path, test_config={"TESTING": True}).testing + + +def test_title_override(): + """Test that a configuration with a specific title overrides the default.""" + instance_path = os.path.join(HERE, 'instance') + app = create_app(instance_path=instance_path, test_config={'TITLE_SUFFIX': 'suou.net'}) + client = app.test_client() + response = client.get('/no-title') + assert response.status_code == 200 + assert b'suou.net' in response.data