Translate models

This commit is contained in:
Alexandre Iooss 2019-07-16 13:50:05 +02:00
parent 2313ebcdb4
commit 7043ab5e45
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
10 changed files with 200 additions and 48 deletions

View file

@ -13,7 +13,9 @@ Defines each note types
class Note(models.Model):
"""
An abstract model, use to add transactions capabilities to a user
An model, use to add transactions capabilities
We do not use an abstract model to simplify the transfer between two notes.
"""
balance = models.IntegerField(
verbose_name=_('account balance'),
@ -28,6 +30,10 @@ class Note(models.Model):
),
)
class Meta:
verbose_name = _("note")
verbose_name_plural = _("notes")
class NoteUser(Note):
"""
@ -74,6 +80,10 @@ class NoteSpecial(Note):
unique=True,
)
class Meta:
verbose_name = _("special note")
verbose_name_plural = _("special notes")
class Alias(models.Model):
"""
@ -88,3 +98,7 @@ class Alias(models.Model):
Note,
on_delete=models.PROTECT,
)
class Meta:
verbose_name = _("alias")
verbose_name_plural = _("aliases")