Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 756 Bytes
# -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
# Grabs the folder where the script runs.
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config.from_object('app.configuration.Config')
db = SQLAlchemy (app) # flask-sqlalchemy
bc = Bcrypt (app) # flask-bcrypt
lm = LoginManager( ) # flask-loginmanager
lm.init_app(app) # init the login manager
# Setup database
@app.before_first_request
def initialize_database():
db.create_all()
# Import routing, models and Start the App
from app import views, models
You can’t perform that action at this time.