Commit 6991aa7c authored by Mathis Dedial's avatar Mathis Dedial
Browse files

Switch to more sensible project structure for SQLAlchemy models

parent 55fb8fb7
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from .models import db
app = Flask(__name__)
db = SQLAlchemy(app)
from app import routes
# Bind SQLAlchemy to Flask app
from app import views
'''Contains model definitions for SQLAlchemy ORM'''
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Burger(db.Model):
'''Contains all views'''
from app import app
-- Setup script for local testing
CREATE USER amivburger IDENTIFIED BY PASSWORD 'amivburgerpassword';
CREATE USER amivburger IDENTIFIED BY 'amivburgerpassword';
GRANT ALL PRIVILEGES ON amivburger.* TO amivburger;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment