cleanup
This commit is contained in:
10
templates/not_found.html
Normal file
10
templates/not_found.html
Normal 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 %}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
from flask import Flask, render_template, request, url_for, redirect
|
from flask import Flask, render_template, request, url_for, redirect
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
app = Flask(__name__)
|
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
games = {}
|
games = {}
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
@@ -50,4 +50,4 @@ def name_show(gameid, player):
|
|||||||
|
|
||||||
@app.errorhandler(KeyError)
|
@app.errorhandler(KeyError)
|
||||||
def not_found(error):
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user