From 2254adf8455953019cadd54ba837c53d3dfaca5d Mon Sep 17 00:00:00 2001 From: Leonardo Giordani Date: Tue, 23 Jun 2020 15:14:03 +0100 Subject: [PATCH] Simplified version of file-based database --- docs/config.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 7a28e027..f09518d4 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -552,10 +552,6 @@ and import different hard-coded files based on that. An interesting pattern is also to use classes and inheritance for configuration:: - import os - - basedir = os.path.abspath(os.path.dirname(__file__)) - class Config(object): TESTING = False @@ -563,7 +559,7 @@ configuration:: DATABASE_URI = 'mysql://user@localhost/foo' class DevelopmentConfig(Config): - DATABASE_URI = "sqlite:///" + os.path.join(basedir, "foo.db") + DATABASE_URI = "sqlite:////tmp/foo.db" class TestingConfig(Config): DATABASE_URI = 'sqlite:///:memory:'