forked from redhat-beyond/edison
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import os | ||
|
||
from flask import Flask | ||
from flask_sqlalchemy import SQLAlchemy | ||
from edison.config import get_config_object | ||
|
||
|
||
# Put app here so the entire app could import it. | ||
app = Flask(__name__) | ||
app.config.from_object(get_config_object(app.config["ENV"])) | ||
basedir = os.path.abspath(os.path.dirname(__file__)) | ||
db = SQLAlchemy(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,11 @@ def get_config_object(env_keyword: str): | |
class Config: | ||
ENV_KEYWORD = "" | ||
DEBUG = False | ||
# Turns off the Flask-SQLAlchemy event system | ||
SQLALCHEMY_TRACK_MODIFICATIONS = False | ||
SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:[email protected]/edison' | ||
|
||
# PostgreSQL connection string should be updated once an actual production environment is established. | ||
class ProductionConfig(Config): | ||
ENV_KEYWORD = "production" | ||
|
||
|