diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-21 03:27:59 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-21 03:27:59 +0200 |
| commit | b94124866266e63369a5054917c2abfb93da5fe6 (patch) | |
| tree | 5b43a20455b7f36c2195373918bdb3bf6cf2bf7a | |
| parent | 5be9b2a0ce083cd3d6624c845736344027bf3dc1 (diff) | |
| download | ihatemoney-mirror-b94124866266e63369a5054917c2abfb93da5fe6.zip ihatemoney-mirror-b94124866266e63369a5054917c2abfb93da5fe6.tar.gz ihatemoney-mirror-b94124866266e63369a5054917c2abfb93da5fe6.tar.bz2 | |
add a demo feature (see #16)
| -rw-r--r-- | budget/templates/home.html | 2 | ||||
| -rw-r--r-- | budget/web.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/budget/templates/home.html b/budget/templates/home.html index b96f579..ea1d31d 100644 --- a/budget/templates/home.html +++ b/budget/templates/home.html @@ -7,7 +7,7 @@ <div id="header"> <div class="slide"> <h1><span>Manage your shared <br>expenses easily</span></h1> - <a href="about.html" class="about_link">Try out the demo</a> + <a href="{{ url_for("demo") }}" class="about_link">Try out the demo</a> </div> </div> {% endblock %} diff --git a/budget/web.py b/budget/web.py index e0bd60e..4e2b33f 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("/<project_id>/invite", methods=["GET", "POST"]) def invite(): |
