This commit is contained in:
2021-04-15 23:23:09 +02:00
parent b8ffa5f4cc
commit 60681bd7e8
2 changed files with 15 additions and 5 deletions

10
templates/not_found.html Normal file
View File

@@ -0,0 +1,10 @@
{% extends "main.html" %}
{% block title %}Not Found{% endblock %}
{% block content %}
<h1>Not Found</h1>
Object not found
<br/>
<a href={{ url_for("create_game") }}>Home</a>
{% endblock %}

View File

@@ -2,8 +2,8 @@
from flask import Flask, render_template, request, url_for, redirect
from pprint import pprint
from uuid import uuid4
app = Flask(__name__)
app = Flask(__name__)
games = {}
@app.route("/")
@@ -50,4 +50,4 @@ def name_show(gameid, player):
@app.errorhandler(KeyError)
def not_found(error):
return "<h1>Not Found</h1>Object not found <br/> <a href={}>home</a>".format(url_for("create_game")), 404
return render_template("not_found.html"), 404