Commit 0cfce749 authored by Pietro Albini's avatar Pietro Albini

Add a not found page

parent 9b97b19a
...@@ -33,6 +33,10 @@ def create_app(data_path): ...@@ -33,6 +33,10 @@ def create_app(data_path):
app.register_blueprint(pages.prepare_blueprint(app)) app.register_blueprint(pages.prepare_blueprint(app))
pages.prepare_navbar(app) pages.prepare_navbar(app)
@app.errorhandler(404)
def not_found(error):
return flask.render_template("404.html")
return app return app
......
{# Source code of the Ubuntu-it website
# Copyright (C) 2016 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block title %} Pagina non trovata {% endblock %}
{% block content %}
<div class="row row-hero">
<div class="twelve-col">
<h2>Questa pagina non esiste</h2>
<p>
Beh, ovviamente <i>questa</i> pagina esiste. Ma la pagina che hai
richiesto non esiste. Infatti, questa pagina è qui solo per dirti
che la pagina che stai cercando non esiste.
</p>
<p>
Se questa pagina esisteva in passato e non la trovi più
<a href="http://forum.ubuntu-it.org/viewforum.php?f=45&sid=855a03444972c626fb2d486b42d05469">
segnalacelo
</a> che provvederemo a sistemare il prima possibile!
</p>
</div>
</div>
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment