def plan_index(request): db = default_storage() plans = Contract.objects(db).order_by("next_date_time") return { "object_list": plans, # 'total_monthly_fee': sum(p.actual_monthly_fee for p in plans) }
def dashboard(request): db = default_storage() contracts = Contract.objects(db).order_by("next_date_time") payments = Payment.objects(db).order_by("date_time") return { "contracts": contracts, "payments": payments, "render_rel_delta": render_rel_delta, "chart_url_for_payments": chart_url_for_payments, "today": datetime.datetime.today(), "default_currency": get_default_currency(), }