Sunil Mohan Adapa 8dce51fa47
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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-02-10 10:17:19 -05:00

36 lines
741 B
HTML

{% extends 'base.html' %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block title %}
<title>
{% blocktrans trimmed %}
Page not found - {{ box_name }}
{% endblocktrans %}
</title>
{% endblock %}
{% block content %}
<h2>{% trans "404" %}</h2>
<p>
{% blocktrans trimmed %}
Requested page {{ request_path }} was not found.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
If you believe this missing page should exist, please file a bug at the
FreedomBox Service (Plinth) project <a
href="https://salsa.debian.org/freedombox-team/freedombox/issues">issue
tracker</a>.
{% endblocktrans %}
</p>
{% endblock %}