summaryrefslogtreecommitdiff
path: root/app/modules/ferti/routes.py
blob: c0f3ab59554492c92dc087434104bab2dfc3c9d2 (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
39
40
41
42
43
44
45
# -*- 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


# from datetime import datetime
import inspect




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


ferti = Blueprint("ferti", __name__)



@ferti.route("/modules/ferti")
@login_required
def view():
    modules = Module.query.all()
    logs = FertiLog.query.order_by(FertiLog.primary_key.desc()).all()
    targets = FertiTarget.query.all()
    module = "ferti"
    flash(f"Latest target is {targets}.", "info")
    return render_template(
        f"modules/{module}.html",
        modules=modules,
        logs=logs,
    )
Copyright 2019--2024 Marius PETER