From b94124866266e63369a5054917c2abfb93da5fe6 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sun, 21 Aug 2011 03:27:59 +0200 Subject: [PATCH] add a demo feature (see #16) --- budget/templates/home.html | 2 +- budget/web.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/budget/templates/home.html b/budget/templates/home.html index b96f5793..ea1d31dd 100644 --- a/budget/templates/home.html +++ b/budget/templates/home.html @@ -7,7 +7,7 @@ {% endblock %} diff --git a/budget/web.py b/budget/web.py index e0bd60ee..4e2b33fa 100644 --- a/budget/web.py +++ b/budget/web.py @@ -123,6 +123,12 @@ def exit(): session.clear() return redirect(url_for("home")) +@app.route("/demo") +def demo(): + project = Project.query.get("demo") + session[project.id] = project.password + return redirect(url_for("list_bills", project_id=project.id)) + @app.route("//invite", methods=["GET", "POST"]) def invite():