From eba4c1a3113d24319bccc5c52d4d93838334bd31 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 3 Jul 2022 20:21:02 +0200 Subject: db now in models; modules. --- app/modules/orders/routes.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/modules/orders') diff --git a/app/modules/orders/routes.py b/app/modules/orders/routes.py index 0d2e66a..cf4e70a 100644 --- a/app/modules/orders/routes.py +++ b/app/modules/orders/routes.py @@ -15,13 +15,9 @@ from flask import ( from flask_login import login_required, current_user -# from datetime import datetime -import inspect - -from ... import db -from ...models import Module, Order +from ...models import db, Module, Order, Invoice from .forms import * @@ -34,6 +30,7 @@ def view(): modules = Module.query.all() page = request.args.get('page', 1, type=int) orders = Order.query.order_by(Order.primary_key.desc()).paginate(page=page, per_page=5) + invoices = Invoice.query.order_by(Invoice.primary_key.desc()).paginate(page=page, per_page=5) module = "orders" flash(f"Successfully accessed module {module}.", "info") flash(f"Still fighting against styling in {module}.", "error") -- cgit v1.2.3