Various bug fixes. Still trying to fix cartesian issue on search.
This commit is contained in:
parent
0dbf246bdb
commit
3c07741500
9 changed files with 412 additions and 94 deletions
|
|
@ -187,6 +187,8 @@ class Config:
|
|||
"synchronous": os.getenv("SQLITE_SYNCHRONOUS", "NORMAL"),
|
||||
}
|
||||
|
||||
STRICT_NPLUS1 = bool(int(os.getenv("CRUDKIT_STRICT_NPLUS1", "1")))
|
||||
|
||||
@classmethod
|
||||
def engine_kwargs(cls) -> Dict[str, Any]:
|
||||
url = cls.DATABASE_URL
|
||||
|
|
@ -221,15 +223,18 @@ class Config:
|
|||
class DevConfig(Config):
|
||||
DEBUG = True
|
||||
SQLALCHEMY_ECHO = bool(int(os.getenv("DB_ECHO", "1")))
|
||||
STRICT_NPLUS1 = bool(int(os.getenv("CRUDKIT_STRICT_NPLUS1", "1")))
|
||||
|
||||
class TestConfig(Config):
|
||||
TESTING = True
|
||||
DATABASE_URL = build_database_url(backend="sqlite", database=":memory:")
|
||||
SQLALCHEMY_ECHO = False
|
||||
STRICT_NPLUS1 = bool(int(os.getenv("CRUDKIT_STRICT_NPLUS1", "1")))
|
||||
|
||||
class ProdConfig(Config):
|
||||
DEBUG = False
|
||||
SQLALCHEMY_ECHO = bool(int(os.getenv("DB_ECHO", "0")))
|
||||
STRICT_NPLUS1 = bool(int(os.getenv("CRUDKIT_STRICT_NPLUS1", "0")))
|
||||
|
||||
def get_config(name: str | None) -> Type[Config]:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue