Add templating for form buttons
This commit is contained in:
parent
7269fcbc6b
commit
a10e798c8c
6 changed files with 29 additions and 16 deletions
|
@ -128,6 +128,7 @@ def category(request, uuid=None):
|
|||
"category": _category,
|
||||
"form": _form,
|
||||
"transactions": Transaction.objects.filter(category=_category),
|
||||
"adding": _category._state.adding,
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -165,7 +166,9 @@ def snapshot(request, uuid=None):
|
|||
|
||||
if _snapshot.transactions:
|
||||
context["categories"] = (
|
||||
_snapshot.transactions.values("category", "category__name", "category__icon")
|
||||
_snapshot.transactions.values(
|
||||
"category", "category__name", "category__icon"
|
||||
)
|
||||
.annotate(
|
||||
sum=models.Sum("value"),
|
||||
sum_m=models.Sum("value", filter=models.Q(value__lt=0)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue