1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

PEP8 compliance

This commit is contained in:
Pierre-antoine Comby 2020-03-09 19:19:56 +01:00
parent 526744052e
commit 46ec16d8c9

View File

@ -6,9 +6,10 @@ from django.db.models import F
from django_tables2.utils import A
from .models.notes import Alias
from .models.transactions import Transaction
from .models.transactions import Transaction, TransactionTemplate
from .templatetags.pretty_money import pretty_money
class HistoryTable(tables.Table):
class Meta:
attrs = {
@ -16,7 +17,7 @@ class HistoryTable(tables.Table):
'table table-condensed table-striped table-hover'
}
model = Transaction
exclude = ("polymorphic_ctype",)
exclude = ("polymorphic_ctype", )
template_name = 'django_tables2/bootstrap4.html'
sequence = ('...', 'total', 'valid')
@ -28,12 +29,13 @@ class HistoryTable(tables.Table):
.order_by(('-' if is_descending else '') + 'total')
return (queryset, True)
def render_amount(self,value):
def render_amount(self, value):
return pretty_money(value)
def render_total(self,value):
def render_total(self, value):
return pretty_money(value)
class AliasTable(tables.Table):
class Meta:
attrs = {