From 4fcaf7d7ec583b794c14597d50abc89ef96450c9 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sat, 23 Jul 2011 15:54:23 +0200 Subject: Kick-start multiple projects support. This commit adds: * support for projects (creation not yet finished) * an authentication mechanism * bugs (basically all the features are not working anymore) --- budget/templates/add_bill.html | 2 +- budget/templates/authenticate.html | 14 ++++++++++++++ budget/templates/create_project.html | 21 +++++++++++++++++++++ budget/templates/debug.html | 1 + budget/templates/layout.html | 4 +--- budget/templates/list_bills.html | 6 +++--- 6 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 budget/templates/authenticate.html create mode 100644 budget/templates/create_project.html create mode 100644 budget/templates/debug.html (limited to 'budget/templates') diff --git a/budget/templates/add_bill.html b/budget/templates/add_bill.html index 37ecfa3..9b13b2e 100644 --- a/budget/templates/add_bill.html +++ b/budget/templates/add_bill.html @@ -8,7 +8,7 @@ {% endif %} -
+ {{ form.hidden_tag() }}

{{ form.payer.label }}
{{ form.payer }}

diff --git a/budget/templates/authenticate.html b/budget/templates/authenticate.html new file mode 100644 index 0000000..c745e9f --- /dev/null +++ b/budget/templates/authenticate.html @@ -0,0 +1,14 @@ +{% extends "layout.html" %} +{% block content %} +

Login to "{{ project.name }}"

+ +{% for errors in form.errors.values() %} +

{{ ", ".join(errors) }}

+{% endfor %} + + + {{ form.hidden_tag() }} + Password: +

{{ form.submit }}

+
+{% endblock %} diff --git a/budget/templates/create_project.html b/budget/templates/create_project.html new file mode 100644 index 0000000..524a592 --- /dev/null +++ b/budget/templates/create_project.html @@ -0,0 +1,21 @@ +{% extends "layout.html" %} + +{% block content %} +

Create a new project

+ +{% if form.errors %} +

Your form contains errors.

+ +{% endif %} + +
+ {{ form.hidden_tag() }} + +

{{ form.name.label }}
{{ form.name }}

+

{{ form.id.label }}
{{ form.id }}

+

{{ form.password.label }}
{{ form.password }}

+

{{ form.contact_email.label }}
{{ form.contact_email }}

+

{{ form.submit }}

+
+{% endblock %} + diff --git a/budget/templates/debug.html b/budget/templates/debug.html new file mode 100644 index 0000000..6f97667 --- /dev/null +++ b/budget/templates/debug.html @@ -0,0 +1 @@ +Yeah diff --git a/budget/templates/layout.html b/budget/templates/layout.html index 50f1884..19c0e59 100644 --- a/budget/templates/layout.html +++ b/budget/templates/layout.html @@ -12,9 +12,7 @@

Account manager ! Manage your shared expenses.

- + {% block top_menu %}{% endblock %}

diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index 09caa48..d0f0c41 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -11,16 +11,16 @@ {{ bill.what }} {% for ower in bill.owers %}{{ ower.name }} {% endfor %} {{ bill.amount }} ({{ bill.pay_each() }} each) - delete + delete {% endfor %} -Compute bills +Compute bills

Periodically (probably at the end of each month, you can compute the balance of each people, in order to reset all the debts. You can also let this "as-is" and try to find a good balance, that's up to you

{% else %} -

Nothing to list yet. You probably want to add a bill ?

+

Nothing to list yet. You probably want to add a bill ?

{% endif %} {% endblock %} -- cgit v1.1