Update __str__ of snapshots

This commit is contained in:
Edgar P. Burkhart 2022-12-26 18:11:09 +01:00
parent 8b859651e8
commit b611085467
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
3 changed files with 7 additions and 2 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-26 18:02+0100\n"
"POT-Creation-Date: 2022-12-26 18:10+0100\n"
"PO-Revision-Date: 2022-12-21 17:30+0100\n"
"Last-Translator: edpibu <git@edgarpierre.fr>\n"
"Language-Team: edpibu <git@edgarpierre.fr>\n"
@ -91,6 +91,11 @@ msgstr "Fichier"
msgid "Invoices"
msgstr "Factures"
#: .\main\models.py:159
#, python-format
msgid "%(date)s snapshot"
msgstr "Relevé du %(date)s"
#: .\main\models.py:261 .\main\templates\main\base.html:49
msgid "Snapshot"
msgstr "Relevé"

View File

@ -156,7 +156,7 @@ class Snapshot(models.Model):
)
def __str__(self):
return f"{_('Snapshot')} {self.date}"
return _("%(date)s snapshot") % {"date": self.date}
def save(self, *args, only_super=False, **kwargs):
if not only_super: