update bill list view

This commit is contained in:
2024-01-17 17:40:38 +00:00
parent d560f56d86
commit d11dace81f
3 changed files with 65 additions and 38 deletions

View File

@@ -57,8 +57,11 @@ class BillListView(LoginRequiredMixin, ListView):
model = Bill
template_name = "finance/index.html"
paginate_by = 10
def get_queryset(self):
return Bill.objects.filter(bill_creator__username=self.request.user)
qs = Bill.objects.filter(bill_creator__username=self.request.user)
return qs.order_by("-date")
class BillUpdateView(LoginRequiredMixin, UserPassesTestMixin, UpdateView):