From 8dce51fa47c7455ed9d46d152866c74e22385553 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 8 Feb 2023 18:13:12 -0800 Subject: [PATCH] templates: Show better title for 404 page Closes: #2293. When running in develop mode, the title already contains 'Page not found'. Commit 0881dae66583304494e052dfaddb9e3a784d2994 already ensured that functional tests see this page title and treat it as 404 page. This change ensures that 404 is detected even when not running in develop mode. Tests: - Run freedombox as 'sudo --user=plinth ./run' without the --develop option. Install and disable JSXC. Visit the page /plinth/apps/jsxc/jsxc/. Notice that the page title is 'Page not found - FreedomBox'. - Functional tests for JSXC work even when service is running without --develop option. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/templates/404.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plinth/templates/404.html b/plinth/templates/404.html index 631dddfc4..96741161d 100644 --- a/plinth/templates/404.html +++ b/plinth/templates/404.html @@ -5,6 +5,14 @@ {% load i18n %} +{% block title %} + + {% blocktrans trimmed %} + Page not found - {{ box_name }} + {% endblocktrans %} + +{% endblock %} + {% block content %}

{% trans "404" %}