1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Make erdnaxe be happy

This commit is contained in:
Yohann D'ANELLO
2020-03-07 22:28:59 +01:00
parent 3eb0c185f2
commit d0206fb790
30 changed files with 215 additions and 205 deletions

View File

@ -2,9 +2,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.urls import reverse
from polymorphic.models import PolymorphicModel
from .notes import Note, NoteClub
@ -44,7 +44,7 @@ class TransactionTemplate(models.Model):
verbose_name=_('name'),
max_length=255,
unique=True,
error_messages={'unique':_("A template with this name already exist")},
error_messages={'unique': _("A template with this name already exist")},
)
destination = models.ForeignKey(
NoteClub,
@ -63,7 +63,7 @@ class TransactionTemplate(models.Model):
max_length=31,
)
display = models.BooleanField(
default = True,
default=True,
)
description = models.CharField(
verbose_name=_('description'),
@ -75,7 +75,7 @@ class TransactionTemplate(models.Model):
verbose_name_plural = _("transaction templates")
def get_absolute_url(self):
return reverse('note:template_update', args=(self.pk, ))
return reverse('note:template_update', args=(self.pk,))
class Transaction(PolymorphicModel):
@ -168,6 +168,7 @@ class TemplateTransaction(Transaction):
on_delete=models.PROTECT,
)
class MembershipTransaction(Transaction):
"""
Special type of :model:`note.Transaction` associated to a :model:`member.Membership`.