[Flask] Simple ERP for a farm.
1
# -*- mode: python; -*-
2
3
"""
4
routes. module
5
----------------
6
7
This Python module contains the logic supporting:
8
1. between website pages
9
2. user requests to the server
10
3. requested content back to the user
11
12
Python dependencies:
13
- flask: provides web application features
14
- forms: provides secure user form submission
15
- sqlalchemy: provides communication with database on server.
16
17
Personal imports:
18
These are used to avoid cluttering this file with
19
placeholder data for posts' content.
20
"""
21
22
23
from flask import(
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
,
32
,
33
)
34
from flask_login import login_required, current_user
35
36
37
# from datetime import datetime
38
# import inspect
39
40
from .import db
41
42
main = ("main",__name__)
43
44
from . import Module, User
45
46
modules = [
47
"auth",
48
"customers",
49
"ferti",
50
"invoices",
51
"orders",
52
"products",
53
]
54
55
56
@main.("/")
57
@main.("/index")
58
def ():
59
"""This is our project home page."""
60
modules = Module..()
61
return (
62
"home.html",user=,project="fapg",modules=
63
)
64
65
66
@main.("/download-database")
67
def ():
68
return ("test.db")
69
70
71
@main.("/modules")
72
def ():
73
# If user is unlogged, should present promotional material for
74
# available modules.
75
return ("modules-promo.html",modules=)
76