-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
33 lines (24 loc) · 994 Bytes
/
app.py
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
from flask import Flask, render_template
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql://andrewbrown@localhost:5432/ItemOrders_app"
db = SQLAlchemy(app)
migrate = Migrate(app, db)
from seed import seed
app.cli.add_command(seed)
from controllers.customers_controller import customers_blueprint
from controllers.orders_controller import order_blueprint
from controllers.items_controller import items_blueprint
from controllers.item_orders import new_order_blueprint
from controllers.new_customer_controller import new_customer_blueprint
app.register_blueprint(customers_blueprint)
app.register_blueprint(order_blueprint)
app.register_blueprint(items_blueprint)
app.register_blueprint(new_order_blueprint)
app.register_blueprint(new_customer_blueprint)
migrate = Migrate(app, db)
@app.route("/")
def home():
return "This is the home page for Jurassic Pork!"