Compare commits

..

No commits in common. "4bbb5de3c5547264dbfbde1f18f3eea28691c8f8" and "76ac6bc7fbd87ab783f5b333e291a417c6da6341" have entirely different histories.

9 changed files with 11 additions and 64 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-25 12:05+0100\n" "POT-Creation-Date: 2023-04-22 15:16+0200\n"
"PO-Revision-Date: 2023-04-22 15:18+0200\n" "PO-Revision-Date: 2023-04-22 15:18+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -61,11 +61,3 @@ msgstr "Dépenses"
#: .\category\templates\category\category_plot.html:16 #: .\category\templates\category\category_plot.html:16
msgid "Income" msgid "Income"
msgstr "Revenus" msgstr "Revenus"
#: .\category\templates\category\category_plot.html:56
msgid "No transaction"
msgstr "Aucune transaction"
#: .\category\templates\category\category_plot.html:64
msgid "Total"
msgstr "Total"

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-25 12:05+0100\n" "POT-Creation-Date: 2023-04-23 08:02+0200\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n" "PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -124,7 +124,3 @@ msgstr "Aucune catégorie"
#: .\main\templates\main\index.html:44 #: .\main\templates\main\index.html:44
msgid "History" msgid "History"
msgstr "Historique" msgstr "Historique"
#: .\main\views.py:68
msgid "was created successfully"
msgstr "a été créé avec succès"

View file

@ -194,25 +194,3 @@ main h2.new {
p { p {
margin: 0.5em 0; margin: 0.5em 0;
} }
ul.messages {
font-weight: 550;
list-style-type: none;
margin: 0;
background: var(--bg-01);
padding: 0;
}
ul.messages li {
padding: calc(var(--gap) / 2) var(--gap);
border-left: var(--border) solid var(--gray);
}
ul.messages li.msg-level-25 {
border-left-color: var(--green-1);
}
ul.messages li.msg-level-30 {
border-left-color: var(--red-1);
}
ul.messages li.msg-level-40 {
border-left-color: var(--red);
}

View file

@ -88,11 +88,6 @@
{% endspaceless %} {% endspaceless %}
{% endblock %} {% endblock %}
<main id="main"> <main id="main">
{% if messages %}
<ul class="messages">
{% for message in messages %}<li class="msg-level-{{ message.level }}">{{ message }}</li>{% endfor %}
</ul>
{% endif %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
</main> </main>
</body> </body>

View file

@ -1,11 +1,8 @@
from account.models import Account from account.models import Account
from category.models import Category from category.models import Category
from django.contrib import messages
from django.contrib.auth import views as auth_views from django.contrib.auth import views as auth_views
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils.html import format_html
from django.utils.translation import gettext as _
from django.views.generic import ( from django.views.generic import (
CreateView, CreateView,
DeleteView, DeleteView,
@ -58,18 +55,7 @@ class NummiCreateView(UserMixin, CreateView):
return super().form_valid(form) return super().form_valid(form)
def get_success_url(self): def get_success_url(self):
surl = super().get_success_url() return self.next or super().get_success_url()
messages.success(
self.request,
format_html(
"<a href='{surl}'>{name}</a> {msg}",
surl=surl,
name=self.object,
msg=_("was created successfully"),
),
)
return self.next or surl
class NummiUpdateView(UserMixin, UpdateView): class NummiUpdateView(UserMixin, UpdateView):

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-25 12:05+0100\n" "POT-Creation-Date: 2023-04-22 15:22+0200\n"
"PO-Revision-Date: 2023-04-22 15:22+0200\n" "PO-Revision-Date: 2023-04-22 15:22+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -65,20 +65,20 @@ msgstr "Relevé"
msgid "Statements" msgid "Statements"
msgstr "Relevés" msgstr "Relevés"
#: .\statement\templates\statement\statement_form.html:4 #: .\statement\templates\statement\statement_form.html:5
#: .\statement\templates\statement\statement_table.html:5 #: .\statement\templates\statement\statement_table.html:5
msgid "Create statement" msgid "Create statement"
msgstr "Créer un relevé" msgstr "Créer un relevé"
#: .\statement\templates\statement\statement_form.html:7 #: .\statement\templates\statement\statement_form.html:8
msgid "New statement" msgid "New statement"
msgstr "Nouveau relevé" msgstr "Nouveau relevé"
#: .\statement\templates\statement\statement_form.html:22 #: .\statement\templates\statement\statement_form.html:23
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: .\statement\templates\statement\statement_form.html:24 #: .\statement\templates\statement\statement_form.html:27
#: .\statement\templates\statement\statement_table.html:28 #: .\statement\templates\statement\statement_table.html:28
msgid "Transactions" msgid "Transactions"
msgstr "Transactions" msgstr "Transactions"

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-25 12:05+0100\n" "POT-Creation-Date: 2023-04-23 08:02+0200\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n" "PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -69,7 +69,7 @@ msgid "Account"
msgstr "Compte" msgstr "Compte"
#: .\transaction\models.py:83 #: .\transaction\models.py:83
#: .\transaction\templates\transaction\transaction_archive_month.html:11 #: .\transaction\templates\transaction\transaction_archive_month.html:12
#: .\transaction\templates\transaction\transaction_list.html:4 #: .\transaction\templates\transaction\transaction_list.html:4
#: .\transaction\templates\transaction\transaction_list.html:7 #: .\transaction\templates\transaction\transaction_list.html:7
msgid "Transactions" msgid "Transactions"
@ -108,7 +108,7 @@ msgstr "Supprimer"
msgid "No invoice" msgid "No invoice"
msgstr "Aucune facture" msgstr "Aucune facture"
#: .\transaction\templates\transaction\transaction_archive_month.html:14 #: .\transaction\templates\transaction\transaction_archive_month.html:15
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"