Skip to content

Commit

Permalink
Merge pull request #243 from pyplati/flask-set-app-context
Browse files Browse the repository at this point in the history
Set app context
  • Loading branch information
pchlap authored Nov 21, 2023
2 parents 8911da5 + 2ca5c9c commit 4a90b71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platipy/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def on_celery_setup_logging(**kwargs):
app = FlaskApp(__name__)
app.config["SECRET_KEY"] = uuid.uuid4().hex

app.app_context().push()

# Configure SQL Alchemy
app.config["SQLALCHEMY_DATABASE_URI"] = f"sqlite:///{env_work}/{os.path.basename(os.getcwd())}.db"
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
Expand Down

0 comments on commit 4a90b71

Please sign in to comment.