feat: Patch setup_django so we can use an inmemory db in specific commands

This commit is contained in:
Cristian
2020-12-08 18:05:37 -05:00
committed by Cristian Vargas
parent 35a5700c73
commit 9aac09a5e1
6 changed files with 18 additions and 13 deletions

View File

@@ -100,10 +100,12 @@ TEMPLATES = [
################################################################################
DATABASE_FILE = Path(OUTPUT_DIR) / SQL_INDEX_FILENAME
DATABASE_NAME = os.environ.get("ARCHIVEBOX_DATABASE_NAME", DATABASE_FILE)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': str(DATABASE_FILE),
'NAME': DATABASE_NAME,
}
}