Compare commits
2 commits
94671b9ac4
...
6b54cc7546
Author | SHA1 | Date | |
---|---|---|---|
6b54cc7546 | |||
1536e7f674 |
2 changed files with 26 additions and 14 deletions
|
@ -19,8 +19,12 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
</form>
|
</form>
|
||||||
<h2>{% translate "Statements" %}</h2>
|
{% if snapshots %}
|
||||||
{% include "main/table/snapshot.html" %}
|
<h2>{% translate "Statements" %}</h2>
|
||||||
<h2>{% translate "Transactions" %}</h2>
|
{% include "main/table/snapshot.html" %}
|
||||||
{% include "main/table/transaction.html" %}
|
{% endif %}
|
||||||
|
{% if transactions %}
|
||||||
|
<h2>{% translate "Transactions" %}</h2>
|
||||||
|
{% include "main/table/transaction.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -241,15 +241,7 @@ class AccountMixin:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class AccountTListView(AccountMixin, TransactionListView):
|
class SnapshotMixin:
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class AccountSListView(AccountMixin, SnapshotListView):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class SnapshotTListView(TransactionListView):
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return super().get_queryset().filter(snapshot=self.kwargs.get("pk"))
|
return super().get_queryset().filter(snapshot=self.kwargs.get("pk"))
|
||||||
|
|
||||||
|
@ -259,7 +251,7 @@ class SnapshotTListView(TransactionListView):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class CategoryTListView(TransactionListView):
|
class CategoryMixin:
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return super().get_queryset().filter(category=self.kwargs.get("pk"))
|
return super().get_queryset().filter(category=self.kwargs.get("pk"))
|
||||||
|
|
||||||
|
@ -269,6 +261,22 @@ class CategoryTListView(TransactionListView):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class AccountTListView(AccountMixin, TransactionListView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class AccountSListView(AccountMixin, SnapshotListView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SnapshotTListView(SnapshotMixin, TransactionListView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class CategoryTListView(CategoryMixin, TransactionListView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class SearchView(TransactionListView):
|
class SearchView(TransactionListView):
|
||||||
def post(self, *args, **kwargs):
|
def post(self, *args, **kwargs):
|
||||||
return redirect("search", search=self.request.POST.get("search"))
|
return redirect("search", search=self.request.POST.get("search"))
|
||||||
|
|
Loading…
Reference in a new issue