From 0633b153f604d973d1b8a6b5c25d9b048a3de0bb Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Sat, 3 Dec 2011 17:40:50 +0100 Subject: [PATCH] Small commit to add more informations in dashboard view. --- budget/templates/dashboard.html | 4 ++-- budget/tests.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/budget/templates/dashboard.html b/budget/templates/dashboard.html index a65bd76..44ece2d 100644 --- a/budget/templates/dashboard.html +++ b/budget/templates/dashboard.html @@ -2,9 +2,9 @@ {% block content %} - + {% for project in projects %} - + {% endfor %}
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills()[1].date }}{{ project.get_bills()[-1].date }}
{% endblock %} diff --git a/budget/tests.py b/budget/tests.py index de6317b..a5022ce 100644 --- a/budget/tests.py +++ b/budget/tests.py @@ -411,6 +411,10 @@ class BudgetTestCase(TestCase): follow_redirects=True) self.assertIn("Invalid email address", resp.data) + def test_dashboard(self): + response = self.app.get("/dashboard") + self.assertEqual(response.status_code, 200) + class APITestCase(TestCase): """Tests the API"""