summaryrefslogtreecommitdiff
path: root/app/modules/customers/routes.py
blob: c8ae07209cb587a817c05b5e5348b85f55d051ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- mode: python; -*-


from flask import (
    Blueprint,
    render_template,
    send_file,
    request,
    redirect,
    flash,
    url_for,
    jsonify,
    abort,
)
from flask_login import login_required, current_user
import inspect


from ... import db
from ...models import *
from .forms import *

customers = Blueprint("customers", __name__)


@customers.route("/modules/customers")
@login_required
def view():
    modules = Module.query.all()
    cust = Customer.query.order_by(Customer.primary_key.desc())
    module = "customers"
    flash(f"Successfully accessed module {module}.", "info")
    flash(f"Still fighting against styling in {module}.", "error")
    return render_template(
        f"modules/{module}.html",
        modules=modules,
        customers=cust,
    )
Copyright 2019--2024 Marius PETER