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
46
|
# -*- 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")
flash(f"Still fighting against styling in {module}.", "error")
return render_template(
f"modules/{module}.html",
modules=modules,
logs=logs,
)
|