From a0872b65c4f1337889c74f5bc73be8bdd19cf982 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 23 Apr 2023 08:08:43 +0200 Subject: [PATCH] Use get_absolute_url to get model urls --- nummi/main/locale/fr_FR/LC_MESSAGES/django.mo | Bin 1596 -> 1682 bytes nummi/main/locale/fr_FR/LC_MESSAGES/django.po | 18 ++++++++++---- nummi/main/templates/main/index.html | 22 +++++++++--------- .../templates/statement/statement_table.html | 4 ++-- .../locale/fr_FR/LC_MESSAGES/django.mo | Bin 1392 -> 1431 bytes .../locale/fr_FR/LC_MESSAGES/django.po | 9 +++++-- nummi/transaction/models.py | 2 +- .../transaction/transaction_table.html | 6 ++--- 8 files changed, 37 insertions(+), 24 deletions(-) diff --git a/nummi/main/locale/fr_FR/LC_MESSAGES/django.mo b/nummi/main/locale/fr_FR/LC_MESSAGES/django.mo index 1e6d0d3f4cc7e1f1acf7fdcf5b36f70079b899ef..4685846eef54e3eb6b0be73dad20de77fa8de525 100644 GIT binary patch delta 636 zcmXZZzb^w}9LMqJuBFAHe${VjBqb6_34=7LghgVonG7_igoH}dOLP#6u$Wv77L$Pq zX=1>{Bq1?&kj5nb0E^B0Q+<-}z3zFQ?|q-=p6AgyY1}Wj22TyGm*^vYh&b_T@u02P z#)L7ADcreihXpaW$2lRjz~g zZX)VicBj==?6wE3=t4G@cHOMEoj1I?>3n8An=AOqz;S3IHa3+Un<%~o9D88KbG_}D Xo88*UXH2D&QTFo{=^GipRI~aAAJ{`2 delta 531 zcmXZZzb^w}9LMqRU9Ua#O4V@`i68M}t4a(dL=6TZ@i#D-3~ajGVvvwXTnvmBX(BOn zG57=g3tdbG5)%fo@cw9@L#wRgmu&nH8HzM@=BtOUs%Ln)Rh\n" "Language-Team: \n" "Language: fr_FR\n" @@ -33,7 +33,7 @@ msgstr "Accueil" msgid "Statements" msgstr "Relevés" -#: .\main\templates\main\base.html:44 .\main\templates\main\index.html:26 +#: .\main\templates\main\base.html:44 .\main\templates\main\index.html:24 msgid "Transactions" msgstr "Transactions" @@ -105,14 +105,22 @@ msgstr "Créer" msgid "Save" msgstr "Enregistrer" -#: .\main\templates\main\index.html:16 +#: .\main\templates\main\index.html:15 msgid "Accounts" msgstr "Comptes" -#: .\main\templates\main\index.html:30 +#: .\main\templates\main\index.html:20 +msgid "No account" +msgstr "Aucun compte" + +#: .\main\templates\main\index.html:28 msgid "Categories" msgstr "Catégories" +#: .\main\templates\main\index.html:34 +msgid "No category" +msgstr "Aucune catégorie" + #: .\main\templates\main\index.html:44 msgid "History" msgstr "Historique" diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html index 5f194d8..cdadde8 100644 --- a/nummi/main/templates/main/index.html +++ b/nummi/main/templates/main/index.html @@ -12,16 +12,14 @@ type="text/css" /> {% endblock %} {% block body %} - {% if accounts %} -

{% translate "Accounts" %}

- {% spaceless %} -

- {% for acc in accounts %} - {{ acc.icon|remix }}{{ acc }} - {% endfor %} -

- {% endspaceless %} - {% endif %} +

{% translate "Accounts" %}

+

+ {% for acc in accounts %} + {{ acc.icon|remix }}{{ acc }} + {% empty %} + {% translate "No account" %} + {% endfor %} +

{% if transactions %}

{% translate "Transactions" %}

{% include "transaction/transaction_table.html" %} @@ -31,7 +29,9 @@ {% spaceless %}

{% for cat in categories %} - {{ cat.icon|remix }}{{ cat }} + {{ cat.icon|remix }}{{ cat }} + {% empty %} + {% translate "No category" %} {% endfor %}

{% endspaceless %} diff --git a/nummi/statement/templates/statement/statement_table.html b/nummi/statement/templates/statement/statement_table.html index e6bc79b..e4310e4 100644 --- a/nummi/statement/templates/statement/statement_table.html +++ b/nummi/statement/templates/statement/statement_table.html @@ -39,12 +39,12 @@ {% if snap.file %}{{ "attachment"|remix }}{% endif %} - {{ snap.date|date:"Y-m-d" }} + {{ snap.date|date:"Y-m-d" }} {% if not account %} {{ snap.account.icon|remix }} - {{ snap.account }} + {{ snap.account }} {% endif %} {{ snap.value|value }} diff --git a/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.mo b/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.mo index 3084334d48152f76c48ebead1d8e0a054790250c..b34179b90b20d71fd55363e1e3f5378f254f26e2 100644 GIT binary patch delta 627 zcmX}py-UMD7{~ET8(U4ZYJI7K1qVfND(Fz1S_HwxML`f8q|_G>15LZ=kVRY^MT+3) zs2~fC)T97cZjsb<{pLsP(s<_kp=*poxz-h|j1(Z>RzvsD&-; z!*=8^s*oM;taq`W{~7GT863lToTHfnYW@MIR6P$J6Bu*KKpmXpI9?+^^T0y|pHK^4 zPzQO9d`ETiiR^8fID{=6#UE4yDNdvPv#9ww)IpapNqw`*Kn2z#x1$Mrs1y6BPjiCN zR|((iwzMG^@gFLvy%Z`kOlC;kXg72#-Pjsnq;Idz6*@TwHzOqV!p?LH>Rd5FsvCv6 q4Wn2pd9~xJS=p_Y_r1zt*>B`yi&kP`I+tJ0T~^}XmfzU0v(_I){V`zx delta 598 zcmX}pzb`{k7{>AUwpY0=%0(F@EKOG}1|kt=2C3apivag6nl{C#p~f z`|$^RFiM+^VIE5iQAC|zr%UDEL^ZyJ1?t-Y8~&`xLxoOJi7!zN+<0$M6Wk#=?H-5l z5l8VE)%XXhz&GlAL|1AsM&+AAX@rNSQO7jwCQ#REL@~}9cDui8a@&7JIMi>Xbi5M#! diff --git a/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.po b/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.po index 92fd5e2..fc73dd9 100644 --- a/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.po +++ b/nummi/transaction/locale/fr_FR/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-22 15:16+0200\n" -"PO-Revision-Date: 2023-04-22 15:23+0200\n" +"POT-Creation-Date: 2023-04-23 08:02+0200\n" +"PO-Revision-Date: 2023-04-23 08:03+0200\n" "Last-Translator: Edgar P. Burkhart \n" "Language-Team: \n" "Language: fr_FR\n" @@ -69,6 +69,7 @@ msgid "Account" msgstr "Compte" #: .\transaction\models.py:83 +#: .\transaction\templates\transaction\transaction_archive_month.html:12 #: .\transaction\templates\transaction\transaction_list.html:4 #: .\transaction\templates\transaction\transaction_list.html:7 msgid "Transactions" @@ -107,6 +108,10 @@ msgstr "Supprimer" msgid "No invoice" msgstr "Aucune facture" +#: .\transaction\templates\transaction\transaction_archive_month.html:15 +msgid "Categories" +msgstr "Catégories" + #: .\transaction\templates\transaction\transaction_form.html:5 #: .\transaction\templates\transaction\transaction_table.html:5 msgid "Create transaction" diff --git a/nummi/transaction/models.py b/nummi/transaction/models.py index 7f20c7c..46cdd20 100644 --- a/nummi/transaction/models.py +++ b/nummi/transaction/models.py @@ -64,7 +64,7 @@ class Transaction(UserModel): return f"{self.name}" def get_absolute_url(self): - return reverse("transaction", kwargs={"pk": self.pk}) + return reverse("transaction", args=(self.pk,)) def get_delete_url(self): return reverse("del_transaction", args=(self.pk,)) diff --git a/nummi/transaction/templates/transaction/transaction_table.html b/nummi/transaction/templates/transaction/transaction_table.html index 27543d2..3af719e 100644 --- a/nummi/transaction/templates/transaction/transaction_table.html +++ b/nummi/transaction/templates/transaction/transaction_table.html @@ -43,7 +43,7 @@ {{ trans.date|date:"Y-m-d" }} - {{ trans.name }} + {{ trans.name }} {{ trans.value|pmvalue }} {{ trans.trader|default_if_none:"" }} @@ -51,7 +51,7 @@ {% if trans.category %} {{ trans.category.icon|remix }} - {{ trans.category }} + {{ trans.category }} {% else %} @@ -60,7 +60,7 @@ {% if not account %} {{ trans.account.icon|remix }} - {{ trans.account }} + {{ trans.account }} {% endif %}