Commit 5db146af authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[enh] list hasn't payed orders

parent b5495280
......@@ -24,6 +24,19 @@
%li
%a{href: "{% url 'admin2_group_order_detail' group_order.pk %}"}= group_order.name
.panel.panel-default
.panel-heading
Hasn't payed
.list-group
-for order in orders
-if not order.has_payed
%a.list-group-item{href: "/admin/ordering/order/{{ order.id }}/change/"}
%span.badge
=order.estimated_price
=order
.col-md-6
.panel.panel-default
.panel-heading
......
from django.shortcuts import render, get_object_or_404
from django.db.models import Sum
from ordering.models import Component, GroupOrder
from ordering.models import Component, GroupOrder, Order
def dashboard(request):
return render(request, "admin2/home.haml", {
"group_orders": GroupOrder.objects.all().order_by("-launched_on"),
"components": Component.objects.all().order_by("full_name"),
"orders": Order.objects.all().order_by("group_order", "id"),
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment