Add snapshot list
This commit is contained in:
parent
29484e3c02
commit
a3797bb7fb
3 changed files with 42 additions and 15 deletions
|
@ -10,17 +10,20 @@ from .models import (
|
|||
InvoiceForm,
|
||||
Category,
|
||||
CategoryForm,
|
||||
Snapshot,
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def index(request):
|
||||
_transactions = Transaction.objects.order_by("-date")[:5]
|
||||
_transactions = Transaction.objects.all()[:5]
|
||||
_categories = Category.objects.all()
|
||||
_snapshots = Snapshot.objects.all()[:5]
|
||||
|
||||
context = {
|
||||
"transactions": _transactions,
|
||||
"categories": _categories,
|
||||
"snapshots": _snapshots,
|
||||
}
|
||||
return render(request, "main/index.html", context)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue