From 35ea308a2692365001dc88212999df9a041bdaf7 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sun, 21 Aug 2011 20:54:20 +0200 Subject: Fix a weird behavior with tests and databases. Now all the database during the tests is in memory, created for each test and cleared at the end of the test. --- budget/templates/forms.html | 15 ++++++--------- budget/templates/home.html | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'budget/templates') diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 4e62f58..690f59d 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -26,17 +26,19 @@ {% endmacro %} -{% macro authenticate(form) %} +{% macro authenticate(form, home=False) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.id) }} {{ input(form.password) }} + {% if not home %} {{ submit(form.submit) }} + {% endif %} {% endmacro %} -{% macro create_project(form) %} +{% macro create_project(form, home=False) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} @@ -44,7 +46,9 @@ {{ input(form.id) }} {{ input(form.password) }} {{ input(form.contact_email) }} + {% if not home %} {{ submit(form.submit) }} + {% endif %} {% endmacro %} @@ -70,10 +74,3 @@ {% endmacro %} - -{% macro authenticate(form) %} - {{ form.hidden_tag() }} - {{ input(form.id) }} - {{ input(form.password) }} - {{ submit(form.submit) }} -{% endmacro %} diff --git a/budget/templates/home.html b/budget/templates/home.html index eb795ba..1b77cbd 100644 --- a/budget/templates/home.html +++ b/budget/templates/home.html @@ -6,29 +6,33 @@ {% block header %} {% endblock %} {% block container %}
-
+
-

Welcome on your budget manager

-

You're sharing a house? Going on holidays with friends? Simply sharing money with others? We can help!

-
+

Log to an existing project...

- {{ forms.authenticate(auth_form) }} + {{ forms.authenticate(auth_form, home=True) }} +
-
+

...or create a new one

- {{ forms.create_project(project_form) }}
+ {{ forms.create_project(project_form, home=True) }} +
-- cgit v1.1