File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 33Copyright (c) 2019 - present AppSeed.us
44"""
55
6- # import Flask
6+ # Import core packages
7+ import os
8+
9+ # Import Flask
710from flask import Flask
11+ from flask_sqlalchemy import SQLAlchemy
12+
13+ # Grabs the folder where the script runs.
14+ basedir = os .path .abspath (os .path .dirname (__file__ ))
815
916# Inject Flask magic
1017app = Flask (__name__ )
1118
1219# App Config - the minimal footprint
13- app .config ['TESTING' ] = True
14- app .config ['SECRET_KEY' ] = 'S#perS3crEt_JamesBond'
20+ app .config ['TESTING' ] = True
21+
22+ # Set up the App SECRET_KEY
23+ SECRET_KEY = 'S_U_perS3crEt_KEY#9999'
24+
25+ # SQLAlchemy Settings
26+ app .config ['SQLALCHEMY_DATABASE_URI' ] = 'sqlite:///' + os .path .join (basedir , 'db.sqlite3' )
27+ app .config ['SQLALCHEMY_TRACK_MODIFICATIONS' ] = False
28+
29+ # Construct the DB Object (SQLAlchemy interface)
30+ db = SQLAlchemy (app )
1531
1632# Import routing to render the pages
1733from app import views
You can’t perform that action at this time.
0 commit comments