Skip to content

Commit

Permalink
feat: add config for running app without persistent database
Browse files Browse the repository at this point in the history
  • Loading branch information
jakuboskera committed Jun 18, 2023
1 parent 6c439e3 commit 4cb1892
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,16 @@ class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = "sqlite:///{0}".format(DB_PATH)


class WithoutPersistentDatabaseConfig(Config):
"""Development configuration"""

DB_NAME = "dev.db"
DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
SQLALCHEMY_DATABASE_URI = "sqlite:///{0}".format(DB_PATH)

config_dict = {
"dev": DevelopmentConfig,
"test": TestingConfig,
"without_persistent_database": WithoutPersistentDatabaseConfig,
"prod": ProductionConfig,
}

0 comments on commit 4cb1892

Please sign in to comment.