From f98990d0a856bb0443435b5247f2be9c4be74c3e Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 1 Jan 2025 13:59:31 +0100 Subject: [PATCH] Update djlint settings --- .../templates/account/account_detail.html | 30 +-- .../templates/account/account_form.html | 4 +- .../templates/category/category_detail.html | 30 +-- .../templates/category/category_form.html | 4 +- .../templates/category/category_plot.html | 208 +++++++++--------- nummi/history/templates/history/plot.html | 158 ++++++------- nummi/main/templates/main/base.html | 176 +++++++-------- nummi/main/templates/main/confirm_delete.html | 34 +-- nummi/main/templates/main/form/base.html | 58 ++--- nummi/main/templates/main/form/fileinput.html | 64 +++--- nummi/main/templates/main/form/form_base.html | 78 +++---- nummi/main/templates/main/form/login.html | 6 +- nummi/main/templates/main/index.html | 110 ++++----- nummi/main/templates/main/list.html | 74 +++---- nummi/main/templates/main/login.html | 16 +- nummi/main/templates/main/pagination.html | 50 ++--- nummi/search/templates/search/search.html | 22 +- .../search/templates/search/search_form.html | 4 +- .../templates/statement/confirm_delete.html | 4 +- .../templates/statement/statement_detail.html | 76 +++---- .../templates/statement/statement_form.html | 14 +- .../templates/statement/statement_list.html | 8 +- .../templates/statement/statement_table.html | 58 ++--- .../transaction/forms/widgets/datalist.html | 2 +- .../templates/transaction/invoice_form.html | 4 +- .../templates/transaction/invoice_table.html | 26 +-- .../transaction_archive_month.html | 32 +-- .../transaction/transaction_archive_year.html | 44 ++-- .../transaction/transaction_detail.html | 74 ++++--- .../transaction/transaction_form.html | 24 +- .../transaction/transaction_list.html | 8 +- .../transaction/transaction_table.html | 178 +++++++-------- pyproject.toml | 4 + 33 files changed, 851 insertions(+), 831 deletions(-) create mode 100644 pyproject.toml diff --git a/nummi/account/templates/account/account_detail.html b/nummi/account/templates/account/account_detail.html index 980d024..183a2f1 100644 --- a/nummi/account/templates/account/account_detail.html +++ b/nummi/account/templates/account/account_detail.html @@ -3,23 +3,23 @@ {% load i18n %} {% block title %}{{ object }} – {{ block.super }}{% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} {% endblock %} {% block body %} -

{{ object.icon|remix }}{{ object }}

-

- {{ "edit"|remix }}{% translate "Edit account" %} -

+

{{ object.icon|remix }}{{ object }}

+

+ {{ "edit"|remix }}{% translate "Edit account" %} +

+
+

{% translate "Statements" %}

+ {% include "statement/statement_table.html" %} +
+ {% if history %}
-

{% translate "Statements" %}

- {% include "statement/statement_table.html" %} +

{% translate "History" %}

+ {% include "history/plot.html" %}
- {% if history %} -
-

{% translate "History" %}

- {% include "history/plot.html" %} -
- {% endif %} + {% endif %} {% endblock %} diff --git a/nummi/account/templates/account/account_form.html b/nummi/account/templates/account/account_form.html index b24800e..6d49950 100644 --- a/nummi/account/templates/account/account_form.html +++ b/nummi/account/templates/account/account_form.html @@ -2,9 +2,9 @@ {% load main_extras %} {% load i18n %} {% block title_new %} - {% translate "Create account" %} + {% translate "Create account" %} {% endblock %} {% block h2_new %} - {% translate "New account" %} + {% translate "New account" %} {% endblock %} {% block h2 %}{{ form.instance.icon|remix }}{{ form.instance }}{% endblock %} diff --git a/nummi/category/templates/category/category_detail.html b/nummi/category/templates/category/category_detail.html index 56643e5..7380893 100644 --- a/nummi/category/templates/category/category_detail.html +++ b/nummi/category/templates/category/category_detail.html @@ -2,23 +2,23 @@ {% load main_extras i18n %} {% block title %}{{ object }} – {{ block.super }}{% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} {% endblock %} {% block body %} -

{{ object.icon|remix }}{{ object }}

-

- {{ "edit"|remix }}{% translate "Edit category" %} -

+

{{ object.icon|remix }}{{ object }}

+

+ {{ "edit"|remix }}{% translate "Edit category" %} +

+
+

{% translate "Transactions" %}

+ {% include "transaction/transaction_table.html" %} +
+ {% if history %}
-

{% translate "Transactions" %}

- {% include "transaction/transaction_table.html" %} +

{% translate "History" %}

+ {% include "history/plot.html" %}
- {% if history %} -
-

{% translate "History" %}

- {% include "history/plot.html" %} -
- {% endif %} + {% endif %} {% endblock %} diff --git a/nummi/category/templates/category/category_form.html b/nummi/category/templates/category/category_form.html index 7e2748e..1d8fffc 100644 --- a/nummi/category/templates/category/category_form.html +++ b/nummi/category/templates/category/category_form.html @@ -2,9 +2,9 @@ {% load main_extras %} {% load i18n %} {% block title_new %} - {% translate "Create category" %} + {% translate "Create category" %} {% endblock %} {% block h2_new %} - {% translate "New category" %} + {% translate "New category" %} {% endblock %} {% block h2 %}{{ form.instance.icon|remix }}{{ form.instance }}{% endblock %} diff --git a/nummi/category/templates/category/category_plot.html b/nummi/category/templates/category/category_plot.html index d60a0f3..fd80fc3 100644 --- a/nummi/category/templates/category/category_plot.html +++ b/nummi/category/templates/category/category_plot.html @@ -1,110 +1,110 @@ {% load main_extras statement_extras %} {% load i18n %}
- - - - - - - - - - - - - - - - {% spaceless %} - {% for cat in categories %} - - - - - - - - {% empty %} - - - - {% endfor %} - {% endspaceless %} - - - {% if categories %} - - - - - - - +
{% translate "Category" %}{% translate "Expenses" %}{% translate "Income" %}
- {% if cat.category %} - {% if month %} - {{ cat.category__icon|remix }}{{ cat.category__name }} - {% elif year %} - {{ cat.category__icon|remix }}{{ cat.category__name }} - {% else %} - {{ cat.category__icon|remix }}{{ cat.category__name }} - {% endif %} - {% endif %} - {{ cat.sum_m|pmvalue }} - {% if cat.sum_m %} -
- {% endif %} - {% if cat.sum < 0 %} -
- {{ cat.sum|pmvalue }} -
- {% endif %} -
- {% if cat.sum_p %} -
- {% endif %} - {% if cat.sum > 0 %} -
- {{ cat.sum|pmvalue }} -
- {% endif %} -
{{ cat.sum_p|pmvalue }}
{% translate "No transaction" %}
{% translate "Total" %}{{ total_m|pmvalue }} -
- {% if total < 0 %} -
- {{ total|pmvalue }} -
- {% endif %} -
-
- {% if total > 0 %} -
- {{ total|pmvalue }} -
- {% endif %} -
{{ total_p|pmvalue }}
+ + + + + + + + + + + + + + + {% spaceless %} + {% for cat in categories %} + + + + + + + + {% empty %} + + + + {% endfor %} + {% endspaceless %} + + + {% if categories %} + + + + - - - - - - + + -
{% translate "Category" %}{% translate "Expenses" %}{% translate "Income" %}
+ {% if cat.category %} + {% if month %} + {{ cat.category__icon|remix }}{{ cat.category__name }} + {% elif year %} + {{ cat.category__icon|remix }}{{ cat.category__name }} + {% else %} + {{ cat.category__icon|remix }}{{ cat.category__name }} + {% endif %} + {% endif %} + {{ cat.sum_m|pmvalue }} + {% if cat.sum_m %} +
+ {% endif %} + {% if cat.sum < 0 %} +
+ {{ cat.sum|pmvalue }} +
+ {% endif %} +
+ {% if cat.sum_p %} +
+ {% endif %} + {% if cat.sum > 0 %} +
+ {{ cat.sum|pmvalue }} +
+ {% endif %} +
{{ cat.sum_p|pmvalue }}
{% translate "No transaction" %}
{% translate "Total" %}{{ total_m|pmvalue }} +
+ {% if total < 0 %} +
+ {{ total|pmvalue }} +
{% endif %} - {% if statement and statement.diff != statement.sum %} -
{% translate "Expected total" %}{{ total|check:statement.diff }} - {% if statement.diff < 0 %} -
- {{ statement.diff|pmvalue }} -
- {% endif %} -
- {% if statement.diff >= 0 %} -
- {{ statement.diff|pmvalue }} -
- {% endif %} -
+
+ {% if total > 0 %} +
+ {{ total|pmvalue }} +
{% endif %} -
+ + {{ total_p|pmvalue }} + + {% endif %} + {% if statement and statement.diff != statement.sum %} + + {% translate "Expected total" %} + {{ total|check:statement.diff }} + + {% if statement.diff < 0 %} +
+ {{ statement.diff|pmvalue }} +
+ {% endif %} + + + {% if statement.diff >= 0 %} +
+ {{ statement.diff|pmvalue }} +
+ {% endif %} + + + + {% endif %} + +
diff --git a/nummi/history/templates/history/plot.html b/nummi/history/templates/history/plot.html index ecf24ed..3993b9d 100644 --- a/nummi/history/templates/history/plot.html +++ b/nummi/history/templates/history/plot.html @@ -3,86 +3,86 @@ {% load transaction_extras %} {% load i18n %}
- - - - {% if not year %} - - {% endif %} - {% calendar_head %} - - - - - {% regroup history.data by month.year as years_list %} - {% for y, y_data in years_list reversed %} - - {% if not year %} - - {% endif %} - {% for m in y_data %} - {% if forloop.parentloop.last and forloop.first %} - {% empty_calendar_cells_start m.month.month %} - {% endif %} - {% if m %} - - {% else %} - - {% endif %} - {% if forloop.parentloop.first and forloop.last %} - {% empty_calendar_cells_end m.month.month %} - {% endif %} - {% endfor %} - - - {% endfor %} - -
{% translate "Year" %}{% translate "Total" %}
{% year_url y %}{% up_down_icon m.sum %}{{ y_data|sum_year|pmrvalue }}
+ + + + {% if not year %} + + {% endif %} + {% calendar_head %} + + + + + {% regroup history.data by month.year as years_list %} + {% for y, y_data in years_list reversed %} + + {% if not year %} + + {% endif %} + {% for m in y_data %} + {% if forloop.parentloop.last and forloop.first %} + {% empty_calendar_cells_start m.month.month %} + {% endif %} + {% if m %} + + {% else %} + + {% endif %} + {% if forloop.parentloop.first and forloop.last %} + {% empty_calendar_cells_end m.month.month %} + {% endif %} + {% endfor %} + + + {% endfor %} + +
{% translate "Year" %}{% translate "Total" %}
{% year_url y %}{% up_down_icon m.sum %}{{ y_data|sum_year|pmrvalue }}
- - - - - - - - - - - - - - +
{{ "expand-up-down"|remix }}{% translate "Month" %}{% translate "Expenses" %}{% translate "Income" %}
+ + + + + + + + + + + + + + + + + {% for date in history.data reversed %} + {% ifchanged %} + {% if date.sum_m or date.sum_p %} + + + + + + + - - - {% for date in history.data reversed %} - {% ifchanged %} - {% if date.sum_m or date.sum_p %} - - - - - - - - - {% else %} - - - - {% endif %} - {% endifchanged %} - {% endfor %} - -
{{ "expand-up-down"|remix }}{% translate "Month" %}{% translate "Expenses" %}{% translate "Income" %}
{% up_down_icon date.sum %} + {% if year %} + {% month_url date.month fmt="F" %} + {% else %} + {% month_url date.month %} + {% endif %} + {{ date.sum_m|pmrvalue }}{% plot_bar date.sum date.sum_m history.max.pm %}{% plot_bar date.sum date.sum_p history.max.pm %}{{ date.sum_p|pmrvalue }}
{% up_down_icon date.sum %} - {% if year %} - {% month_url date.month fmt="F" %} - {% else %} - {% month_url date.month %} - {% endif %} - {{ date.sum_m|pmrvalue }}{% plot_bar date.sum date.sum_m history.max.pm %}{% plot_bar date.sum date.sum_p history.max.pm %}{{ date.sum_p|pmrvalue }}
+ {% else %} + + + + {% endif %} + {% endifchanged %} + {% endfor %} + +
diff --git a/nummi/main/templates/main/base.html b/nummi/main/templates/main/base.html index 0a68817..5c3d691 100644 --- a/nummi/main/templates/main/base.html +++ b/nummi/main/templates/main/base.html @@ -3,92 +3,94 @@ {% load main_extras %} - - - - - {% block title %}Nummi{% endblock %} - - {% block link %} - - {% css "main/css/main.css" %} - {% js "main/js/base.js" %} - {% endblock %} - - - {% block nav %} - {% spaceless %} - - {% endspaceless %} - {% endblock %} -
- {% if messages %} - + + + + + {% block title %}Nummi{% endblock %} + + {% block link %} + + {% css "main/css/main.css" %} + {% js "main/js/base.js" %} + {% endblock %} + + + {% block nav %} + {% spaceless %} +
- + + + {% endspaceless %} + {% endblock %} +
+ {% if messages %} + + {% endif %} + {% block body %}{% endblock %} +
+ diff --git a/nummi/main/templates/main/confirm_delete.html b/nummi/main/templates/main/confirm_delete.html index db59293..1def25f 100644 --- a/nummi/main/templates/main/confirm_delete.html +++ b/nummi/main/templates/main/confirm_delete.html @@ -3,23 +3,23 @@ {% load main_extras %} {% load i18n %} {% block link %} - {{ block.super }} - {% css "main/css/form.css" %} - {% css "main/css/table.css" %} + {{ block.super }} + {% css "main/css/form.css" %} + {% css "main/css/table.css" %} {% endblock %} {% block body %} - {% spaceless %} -
- {% csrf_token %} -

- {% blocktranslate %}Are you sure you want do delete {{ object }} ?{% endblocktranslate %} -

- {% block additionalinfo %}{% endblock %} - {{ form }} - -
- {% endspaceless %} + {% spaceless %} +
+ {% csrf_token %} +

+ {% blocktranslate %}Are you sure you want do delete {{ object }} ?{% endblocktranslate %} +

+ {% block additionalinfo %}{% endblock %} + {{ form }} + +
+ {% endspaceless %} {% endblock %} diff --git a/nummi/main/templates/main/form/base.html b/nummi/main/templates/main/form/base.html index fc9a4e3..1315c98 100644 --- a/nummi/main/templates/main/form/base.html +++ b/nummi/main/templates/main/form/base.html @@ -3,36 +3,38 @@ {% load main_extras %} {% load i18n %} {% block title %} - {% if form.instance|adding %} - {% block title_new %}{% endblock %} - {% else %} - {{ form.instance }} - {% endif %} - – Nummi + {% if form.instance|adding %} + {% block title_new %}{% endblock %} + {% else %} + {{ form.instance }} + {% endif %} + – Nummi {% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/form.css" %} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/form.css" %} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} {% endblock %} {% block body %} - {% with instance=form.instance %} - {% if instance|adding %} -

- {% block h2_new %}{% endblock %} -

- {% else %} -

- {% block h2 %}{{ instance }}{% endblock %} -

- {% endif %} - {% block pre %}{% endblock %} -
- {% csrf_token %} - {% if instance|adding %}{% endif %} - {{ form }} -
- {% block tables %}{% endblock %} - {% endwith %} + {% with instance=form.instance %} + {% if instance|adding %} +

+ {% block h2_new %}{% endblock %} +

+ {% else %} +

+ {% block h2 %}{{ instance }}{% endblock %} +

+ {% endif %} + {% block pre %}{% endblock %} +
+ {% csrf_token %} + {% if instance|adding %} + + {% endif %} + {{ form }} +
+ {% block tables %}{% endblock %} + {% endwith %} {% endblock %} diff --git a/nummi/main/templates/main/form/fileinput.html b/nummi/main/templates/main/form/fileinput.html index c9ffd65..409448c 100644 --- a/nummi/main/templates/main/form/fileinput.html +++ b/nummi/main/templates/main/form/fileinput.html @@ -1,36 +1,36 @@ {% load i18n %} {% load main_extras %} - {% if widget.is_initial %} + {% if widget.is_initial %} + + + + + {% if not widget.required %} + + + + + {% endif %} + + + - - - - {% if not widget.required %} - - - - - {% endif %} - - - - - -
{{ widget.initial_text }} + {% translate "File" %} [{{ widget.value|extension }}] +
+ + + +
{{ widget.input_text }} + {% else %}
{{ widget.initial_text }} - {% translate "File" %} [{{ widget.value|extension }}] -
- - - -
{{ widget.input_text }} - {% else %} -
- {% endif %} - -
+ + {% endif %} + + + + diff --git a/nummi/main/templates/main/form/form_base.html b/nummi/main/templates/main/form/form_base.html index 4d61bf7..d206bbd 100644 --- a/nummi/main/templates/main/form/form_base.html +++ b/nummi/main/templates/main/form/form_base.html @@ -1,43 +1,43 @@ {% load i18n %} {% load main_extras %} {% block fields %} - {% if form.non_field_errors %} - - {% endif %} - - - {% for field in form %} - {% if field.errors %} - - - - {% endif %} - - - - - {% endfor %} - - - - - - -
{{ field.errors }}
- - {{ field }}
- {% block buttons %} - {% if not form.instance|adding %} - {% translate "Delete" %} - {% endif %} - - {% if form.instance|adding %} - - {% else %} - - {% endif %} - {% endblock %} -
+ {% if form.non_field_errors %} + + {% endif %} + + + {% for field in form %} + {% if field.errors %} + + + + {% endif %} + + + + + {% endfor %} + + + + + + +
{{ field.errors }}
+ + {{ field }}
+ {% block buttons %} + {% if not form.instance|adding %} + {% translate "Delete" %} + {% endif %} + + {% if form.instance|adding %} + + {% else %} + + {% endif %} + {% endblock %} +
{% endblock %} diff --git a/nummi/main/templates/main/form/login.html b/nummi/main/templates/main/form/login.html index 38e1726..a6af180 100644 --- a/nummi/main/templates/main/form/login.html +++ b/nummi/main/templates/main/form/login.html @@ -1,7 +1,7 @@ {% extends "main/form/form_base.html" %} {% load i18n %} {% block buttons %} - - - + + + {% endblock %} diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html index 550f843..e63c8ae 100644 --- a/nummi/main/templates/main/index.html +++ b/nummi/main/templates/main/index.html @@ -3,61 +3,63 @@ {% load main_extras %} {% load i18n %} {% block link %} - {{ block.super }} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} - {% js "main/js/index.js" %} + {{ block.super }} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} + {% js "main/js/index.js" %} {% endblock %} {% block body %} -
-
-

{% translate "Accounts" %}

-
- {% for acc in accounts %} - - {% endfor %} - - -
-
-
-

{% translate "Statements" %}

- {% include "statement/statement_table.html" %} -
-
-
-

{% translate "Categories" %}

- {% spaceless %} -

- {% for cat in categories %} - {{ cat.icon|remix }}{{ cat }} - {% endfor %} - {{ "add"|remix }}{% translate "Create category" %} -

- {% endspaceless %} +
+
+

{% translate "Accounts" %}

+
+ {% for acc in accounts %} + + {% endfor %} + + +
- {% if history %} -
-

{% translate "History" %}

- {% include "history/plot.html" %} -
- {% endif %} +
+

{% translate "Statements" %}

+ {% include "statement/statement_table.html" %} +
+
+
+

{% translate "Categories" %}

+ {% spaceless %} +

+ {% for cat in categories %} + {{ cat.icon|remix }}{{ cat }} + {% endfor %} + {{ "add"|remix }}{% translate "Create category" %} +

+ {% endspaceless %} +
+ {% if history %} +
+

{% translate "History" %}

+ {% include "history/plot.html" %} +
+ {% endif %} {% endblock %} diff --git a/nummi/main/templates/main/list.html b/nummi/main/templates/main/list.html index 7f40df7..0f5d325 100644 --- a/nummi/main/templates/main/list.html +++ b/nummi/main/templates/main/list.html @@ -3,45 +3,45 @@ {% load main_extras %} {% load i18n %} {% block title %} - {% block name %}{% endblock %} - {% if account %}– {{ account }}{% endif %} - {% if category %}– {{ category }}{% endif %} - {% if search %} - – {% translate "Search" %} - {% endif %} - – Nummi + {% block name %}{% endblock %} + {% if account %}– {{ account }}{% endif %} + {% if category %}– {{ category }}{% endif %} + {% if search %} + – {% translate "Search" %} + {% endif %} + – Nummi {% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/table.css" %} + {{ block.super }} + {% css "main/css/table.css" %} {% endblock %} {% block body %} -

- {% block h2 %}{% endblock %} -

- {% if account or category or search %} - - {% endif %} - {% include "main/pagination.html" %} - {% block table %}{% endblock %} - {% include "main/pagination.html" %} - {% block body_more %}{% endblock %} +

+ {% block h2 %}{% endblock %} +

+ {% if account or category or search %} + + {% endif %} + {% include "main/pagination.html" %} + {% block table %}{% endblock %} + {% include "main/pagination.html" %} + {% block body_more %}{% endblock %} {% endblock %} diff --git a/nummi/main/templates/main/login.html b/nummi/main/templates/main/login.html index 0182a8c..0754b5b 100644 --- a/nummi/main/templates/main/login.html +++ b/nummi/main/templates/main/login.html @@ -3,14 +3,14 @@ {% load static %} {% load i18n %} {% block link %} - {{ block.super }} - {% css "main/css/table.css" %} - {% css "main/css/form.css" %} + {{ block.super }} + {% css "main/css/table.css" %} + {% css "main/css/form.css" %} {% endblock %} {% block body %} -

{% translate "Log in" %}

-
- {% csrf_token %} - {% include "main/form/login.html" %} -
+

{% translate "Log in" %}

+
+ {% csrf_token %} + {% include "main/form/login.html" %} +
{% endblock %} diff --git a/nummi/main/templates/main/pagination.html b/nummi/main/templates/main/pagination.html index ffb5d3e..0cad121 100644 --- a/nummi/main/templates/main/pagination.html +++ b/nummi/main/templates/main/pagination.html @@ -1,32 +1,32 @@ {% load i18n transaction_extras %} {% if page_obj %} -

- {% for page in paginator.page_range %} - {{ page }} - {% endfor %} -

+

+ {% for page in paginator.page_range %} + {{ page }} + {% endfor %} +

{% endif %} {% if month %} -

{% year_url month %}

-

- {% if previous_month %} - {% month_url previous_month fmt="F Y" %} - {% endif %} - {% month_url month cls="cur" fmt="F Y" %} - {% if next_month %} - {% month_url next_month fmt="F Y" %} - {% endif %} -

+

{% year_url month %}

+

+ {% if previous_month %} + {% month_url previous_month fmt="F Y" %} + {% endif %} + {% month_url month cls="cur" fmt="F Y" %} + {% if next_month %} + {% month_url next_month fmt="F Y" %} + {% endif %} +

{% endif %} {% if year %} -

- {% if previous_year %} - {% year_url previous_year cls="prev" %} - {% endif %} - {% year_url year cls="cur" %} - {% if next_year %} - {% year_url next_year cls="next" %} - {% endif %} -

+

+ {% if previous_year %} + {% year_url previous_year cls="prev" %} + {% endif %} + {% year_url year cls="cur" %} + {% if next_year %} + {% year_url next_year cls="next" %} + {% endif %} +

{% endif %} diff --git a/nummi/search/templates/search/search.html b/nummi/search/templates/search/search.html index 18ecdc8..3dbf5f8 100644 --- a/nummi/search/templates/search/search.html +++ b/nummi/search/templates/search/search.html @@ -3,19 +3,19 @@ {% load main_extras %} {% load i18n %} {% block title %} - {% translate "Search" %} – Nummi + {% translate "Search" %} – Nummi {% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/form.css" %} - {% css "main/css/table.css" %} + {{ block.super }} + {% css "main/css/form.css" %} + {% css "main/css/table.css" %} {% endblock %} {% block body %} -

{% translate "Search" %}

- {% spaceless %} - - {% endspaceless %} +

{% translate "Search" %}

+ {% spaceless %} + + {% endspaceless %} {% endblock %} diff --git a/nummi/search/templates/search/search_form.html b/nummi/search/templates/search/search_form.html index af7b012..b4b42b5 100644 --- a/nummi/search/templates/search/search_form.html +++ b/nummi/search/templates/search/search_form.html @@ -1,6 +1,6 @@ {% extends "main/form/form_base.html" %} {% load i18n %} {% block buttons %} - - + + {% endblock %} diff --git a/nummi/statement/templates/statement/confirm_delete.html b/nummi/statement/templates/statement/confirm_delete.html index ebdaf4b..a318415 100644 --- a/nummi/statement/templates/statement/confirm_delete.html +++ b/nummi/statement/templates/statement/confirm_delete.html @@ -1,5 +1,7 @@ {% extends "main/confirm_delete.html" %} {% load i18n %} {% block additionalinfo %} -

{% blocktranslate %}This will delete all transactions in this statement.{% endblocktranslate %}

+

+ {% blocktranslate %}This will delete all transactions in this statement.{% endblocktranslate %} +

{% endblock %} diff --git a/nummi/statement/templates/statement/statement_detail.html b/nummi/statement/templates/statement/statement_detail.html index bc27ade..ea2c21e 100644 --- a/nummi/statement/templates/statement/statement_detail.html +++ b/nummi/statement/templates/statement/statement_detail.html @@ -1,45 +1,47 @@ {% extends "main/base.html" %} {% load i18n main_extras statement_extras category %} {% block title %} - {{ statement }} - – Nummi + {{ statement }} + – Nummi {% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/form.css" %} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/form.css" %} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} {% endblock %} {% block body %} -

{{ statement }}

-

- {{ account.icon|remix }}{{ account }} -

-

- {{ "file-edit"|remix }}{% translate "Edit statement" %} -

-
- - {{ statement.start_date|date:"Y-m-d" }} - {{ statement.start_value|value }} - - - {{ statement.sum|pmvalue }} - {{ "arrow-right"|remix }} - {% if statement.diff != statement.sum %}{{ statement.diff|pmvalue }}{% endif %} - - - {{ statement.date|date:"Y-m-d" }} - {{ statement.value|value }} - - {{ statement.sum|check:statement.diff }} -
-
-

{% translate "Transactions" %}

- {% include "transaction/transaction_table.html" %} -
-
-

{% translate "Categories" %}

- {% category_plot transactions budget=False statement=object %} -
+

{{ statement }}

+

+ {{ account.icon|remix }}{{ account }} +

+

+ {{ "file-edit"|remix }}{% translate "Edit statement" %} +

+
+ + {{ statement.start_date|date:"Y-m-d" }} + {{ statement.start_value|value }} + + + {{ statement.sum|pmvalue }} + {{ "arrow-right"|remix }} + {% if statement.diff != statement.sum %} + {{ statement.diff|pmvalue }} + {% endif %} + + + {{ statement.date|date:"Y-m-d" }} + {{ statement.value|value }} + + {{ statement.sum|check:statement.diff }} +
+
+

{% translate "Transactions" %}

+ {% include "transaction/transaction_table.html" %} +
+
+

{% translate "Categories" %}

+ {% category_plot transactions budget=False statement=object %} +
{% endblock %} diff --git a/nummi/statement/templates/statement/statement_form.html b/nummi/statement/templates/statement/statement_form.html index 46c5eb0..85640e0 100644 --- a/nummi/statement/templates/statement/statement_form.html +++ b/nummi/statement/templates/statement/statement_form.html @@ -1,15 +1,15 @@ {% extends "main/form/base.html" %} {% load i18n main_extras statement_extras category %} {% block title_new %} - {% translate "Create statement" %} + {% translate "Create statement" %} {% endblock %} {% block h2_new %} - {% translate "New statement" %} + {% translate "New statement" %} {% endblock %} {% block pre %} - {% if not instance|adding %} -

- {{ "arrow-go-back"|remix }}{% translate "Back" %} -

- {% endif %} + {% if not instance|adding %} +

+ {{ "arrow-go-back"|remix }}{% translate "Back" %} +

+ {% endif %} {% endblock %} diff --git a/nummi/statement/templates/statement/statement_list.html b/nummi/statement/templates/statement/statement_list.html index cd19d8b..9d3ea04 100644 --- a/nummi/statement/templates/statement/statement_list.html +++ b/nummi/statement/templates/statement/statement_list.html @@ -1,12 +1,12 @@ {% extends "main/list.html" %} {% load i18n %} {% block name %} - {% translate "Statements" %} + {% translate "Statements" %} {% endblock %} {% block h2 %} - {% translate "Statements" %} + {% translate "Statements" %} {% endblock %} {% block table %} - {% url "new_statement" as new_statement_url %} - {% include "statement/statement_table.html" %} + {% url "new_statement" as new_statement_url %} + {% include "statement/statement_table.html" %} {% endblock %} diff --git a/nummi/statement/templates/statement/statement_table.html b/nummi/statement/templates/statement/statement_table.html index 35340a8..d3cae57 100644 --- a/nummi/statement/templates/statement/statement_table.html +++ b/nummi/statement/templates/statement/statement_table.html @@ -1,33 +1,33 @@ {% load i18n main_extras statement_extras %}
-
diff --git a/nummi/transaction/templates/transaction/forms/widgets/datalist.html b/nummi/transaction/templates/transaction/forms/widgets/datalist.html index 7d37327..13d73d1 100644 --- a/nummi/transaction/templates/transaction/forms/widgets/datalist.html +++ b/nummi/transaction/templates/transaction/forms/widgets/datalist.html @@ -5,5 +5,5 @@ {% if widget.value != None %}value="{{ widget.value|stringformat:'s' }}"{% endif %} {% include "django/forms/widgets/attrs.html" %}> - {% for option in widget.options %}{% endfor %} + {% for option in widget.options %}{% endfor %} diff --git a/nummi/transaction/templates/transaction/invoice_form.html b/nummi/transaction/templates/transaction/invoice_form.html index 6a724f4..05d81bc 100644 --- a/nummi/transaction/templates/transaction/invoice_form.html +++ b/nummi/transaction/templates/transaction/invoice_form.html @@ -1,8 +1,8 @@ {% extends "main/form/base.html" %} {% load i18n %} {% block title_new %} - {% translate "Create invoice" %} + {% translate "Create invoice" %} {% endblock %} {% block h2_new %} - {% translate "New invoice" %} + {% translate "New invoice" %} {% endblock %} diff --git a/nummi/transaction/templates/transaction/invoice_table.html b/nummi/transaction/templates/transaction/invoice_table.html index c17578c..f67b659 100644 --- a/nummi/transaction/templates/transaction/invoice_table.html +++ b/nummi/transaction/templates/transaction/invoice_table.html @@ -1,17 +1,17 @@ {% load main_extras %} {% load i18n %} diff --git a/nummi/transaction/templates/transaction/transaction_archive_month.html b/nummi/transaction/templates/transaction/transaction_archive_month.html index 7d9691d..58937ec 100644 --- a/nummi/transaction/templates/transaction/transaction_archive_month.html +++ b/nummi/transaction/templates/transaction/transaction_archive_month.html @@ -1,28 +1,28 @@ {% extends "transaction/transaction_list.html" %} {% load i18n main_extras transaction_extras static category %} {% block link %} - {{ block.super }} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/plot.css" %} {% endblock %} {% block name %}{{ month|date:"F Y"|capfirst }}{% endblock %} {% block h2 %}{{ month|date:"F Y"|capfirst }}{% endblock %} {% block backlinks %} - {{ block.super }} - {% if account or category %} -

- {% translate "Back" %}{{ "arrow-go-back"|remix }} -

- {% endif %} + {{ block.super }} + {% if account or category %} +

+ {% translate "Back" %}{{ "arrow-go-back"|remix }} +

+ {% endif %} {% endblock %} {% block table %} - {% if not category %} -
-

{% translate "Categories" %}

- {% category_plot transactions month=month %} -
- {% endif %} + {% if not category %}
-

{% translate "Transactions" %}

- {{ block.super }} +

{% translate "Categories" %}

+ {% category_plot transactions month=month %}
+ {% endif %} +
+

{% translate "Transactions" %}

+ {{ block.super }} +
{% endblock %} diff --git a/nummi/transaction/templates/transaction/transaction_archive_year.html b/nummi/transaction/templates/transaction/transaction_archive_year.html index f8afb5e..d6a28c4 100644 --- a/nummi/transaction/templates/transaction/transaction_archive_year.html +++ b/nummi/transaction/templates/transaction/transaction_archive_year.html @@ -1,34 +1,34 @@ {% extends "transaction/transaction_list.html" %} {% load i18n main_extras static category %} {% block link %} - {{ block.super }} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/plot.css" %} {% endblock %} {% block name %}{{ year|date:"Y" }}{% endblock %} {% block h2 %}{{ year|date:"Y" }}{% endblock %} {% block backlinks %} - {{ block.super }} - {% if account or category %} -

- {% translate "Back" %}{{ "arrow-go-back"|remix }} -

- {% endif %} + {{ block.super }} + {% if account or category %} +

+ {% translate "Back" %}{{ "arrow-go-back"|remix }} +

+ {% endif %} {% endblock %} {% block table %} - {% if history %} -
-

{% translate "History" %}

- {% include "history/plot.html" %} -
- {% endif %} - {% if not category %} -
-

{% translate "Categories" %}

- {% category_plot transactions year=year %} -
- {% endif %} + {% if history %}
-

{% translate "Transactions" %}

- {{ block.super }} +

{% translate "History" %}

+ {% include "history/plot.html" %}
+ {% endif %} + {% if not category %} +
+

{% translate "Categories" %}

+ {% category_plot transactions year=year %} +
+ {% endif %} +
+

{% translate "Transactions" %}

+ {{ block.super }} +
{% endblock %} diff --git a/nummi/transaction/templates/transaction/transaction_detail.html b/nummi/transaction/templates/transaction/transaction_detail.html index d80b53c..a879a3e 100644 --- a/nummi/transaction/templates/transaction/transaction_detail.html +++ b/nummi/transaction/templates/transaction/transaction_detail.html @@ -2,43 +2,47 @@ {% load i18n %} {% load main_extras %} {% block title %} - {{ transaction }} - – Nummi + {{ transaction }} + – Nummi {% endblock %} {% block link %} - {{ block.super }} - {% css "main/css/form.css" %} - {% css "main/css/table.css" %} - {% css "main/css/plot.css" %} + {{ block.super }} + {% css "main/css/form.css" %} + {% css "main/css/table.css" %} + {% css "main/css/plot.css" %} {% endblock %} {% block body %} -

{{ transaction }}

-
- -

- {{ "edit"|remix }}{% translate "Edit transaction" %} -

- {% if transaction.description %}

{{ transaction.description|linebreaksbr }}

{% endif %} -
-
-

{% translate "Invoices" %}

- {% include "transaction/invoice_table.html" %} -
+

{{ transaction }}

+
+ +

+ {{ "edit"|remix }}{% translate "Edit transaction" %} +

+ {% if transaction.description %} +

{{ transaction.description|linebreaksbr }}

+ {% endif %} +
+
+

{% translate "Invoices" %}

+ {% include "transaction/invoice_table.html" %} +
{% endblock %} diff --git a/nummi/transaction/templates/transaction/transaction_form.html b/nummi/transaction/templates/transaction/transaction_form.html index 0b215bb..5aefbb4 100644 --- a/nummi/transaction/templates/transaction/transaction_form.html +++ b/nummi/transaction/templates/transaction/transaction_form.html @@ -2,20 +2,20 @@ {% load i18n %} {% load main_extras %} {% block title_new %} - {% translate "Create transaction" %} + {% translate "Create transaction" %} {% endblock %} {% block h2_new %} - {% translate "New transaction" %} + {% translate "New transaction" %} {% endblock %} {% block pre %} - {% if statement %} -

- {{ statement }} -

- {% endif %} - {% if not instance|adding %} -

- {{ "arrow-go-back"|remix }}{% translate "Back" %} -

- {% endif %} + {% if statement %} +

+ {{ statement }} +

+ {% endif %} + {% if not instance|adding %} +

+ {{ "arrow-go-back"|remix }}{% translate "Back" %} +

+ {% endif %} {% endblock %} diff --git a/nummi/transaction/templates/transaction/transaction_list.html b/nummi/transaction/templates/transaction/transaction_list.html index c75751c..890cec7 100644 --- a/nummi/transaction/templates/transaction/transaction_list.html +++ b/nummi/transaction/templates/transaction/transaction_list.html @@ -1,12 +1,12 @@ {% extends "main/list.html" %} {% load i18n %} {% block name %} - {% translate "Transactions" %} + {% translate "Transactions" %} {% endblock %} {% block h2 %} - {% translate "Transactions" %} + {% translate "Transactions" %} {% endblock %} {% block table %} - {% url "new_transaction" as new_transaction_url %} - {% include "transaction/transaction_table.html" %} + {% url "new_transaction" as new_transaction_url %} + {% include "transaction/transaction_table.html" %} {% endblock %} diff --git a/nummi/transaction/templates/transaction/transaction_table.html b/nummi/transaction/templates/transaction/transaction_table.html index ab25a82..9364ec1 100644 --- a/nummi/transaction/templates/transaction/transaction_table.html +++ b/nummi/transaction/templates/transaction/transaction_table.html @@ -1,93 +1,95 @@ {% load main_extras transaction_extras %} {% load i18n %}
- - - - - - - - - {% if not category %}{% endif %} - {% if not account %}{% endif %} - - - {% if new_transaction_url %} - - - - {% endif %} - - - - - - - - {% if not category %} - - {% endif %} - {% if not account %} - - {% endif %} - - - - {% for trans in transactions %} - - - - - {% if trans.value >= 0 %}{% endif %} - - {% if trans.value < 0 %}{% endif %} - - {% if not category %} - {% if trans.category %} - - {% else %} - - {% endif %} - {% endif %} - {% if not account %} - - {% endif %} - - {% empty %} - - - - {% endfor %} - - {% if transactions_url %} - - - - - +
- {% translate "Create transaction" %} -
{{ "attachment"|remix }}{% translate "Date" %}{% translate "Name" %}{% translate "Expenses" %}{% translate "Income" %}{% translate "Trader" %}{% translate "Category" %}{% translate "Account" %}
- {% for invoice in trans.invoices %}{{ "attachment"|remix }}{% endfor %} - - - - {{ trans.name }} - {{ trans.value|pmvalue }}{{ trans.trader|default_if_none:"" }} - {{ trans.category.icon|remix }}{{ trans.category }} - - {{ trans.account.icon|remix }}{{ trans.account }} -
{% translate "No transaction" %}
- {% translate "View all transactions" %} -
+ + + + + + + + {% if not category %}{% endif %} + {% if not account %}{% endif %} + + + {% if new_transaction_url %} + + + + {% endif %} + + + + + + + + {% if not category %} + {% endif %} -
+ {% translate "Create transaction" %} +
{{ "attachment"|remix }}{% translate "Date" %}{% translate "Name" %}{% translate "Expenses" %}{% translate "Income" %}{% translate "Trader" %}{% translate "Category" %}
+ {% if not account %} + {% translate "Account" %} + {% endif %} + + + + {% for trans in transactions %} + + + {% for invoice in trans.invoices %} + {{ "attachment"|remix }} + {% endfor %} + + + + + + {{ trans.name }} + + {% if trans.value >= 0 %}{% endif %} + {{ trans.value|pmvalue }} + {% if trans.value < 0 %}{% endif %} + {{ trans.trader|default_if_none:"" }} + {% if not category %} + {% if trans.category %} + + {{ trans.category.icon|remix }}{{ trans.category }} + + {% else %} + + {% endif %} + {% endif %} + {% if not account %} + + {{ trans.account.icon|remix }}{{ trans.account }} + + {% endif %} + + {% empty %} + + {% translate "No transaction" %} + + {% endfor %} + + {% if transactions_url %} + + + + {% translate "View all transactions" %} + + + + {% endif %} +
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..82c7188 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.djlint] +indent=2 +max_blank_lines=1 +max_line_length=89