File tree 1 file changed +19
-3
lines changed
1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 3
3
Copyright (c) 2019 - present AppSeed.us
4
4
"""
5
5
6
- # import Flask
6
+ # Import core packages
7
+ import os
8
+
9
+ # Import Flask
7
10
from 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__ ))
8
15
9
16
# Inject Flask magic
10
17
app = Flask (__name__ )
11
18
12
19
# 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 )
15
31
16
32
# Import routing to render the pages
17
33
from app import views
You can’t perform that action at this time.
0 commit comments