Skip to content

Commit 78fa3c1

Browse files
committed
Added backup config and library.
1 parent f30b5dc commit 78fa3c1

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# projectj-specific files
22
flashcards/create_word_csvs.py
33
data/datadump*
4+
data/backups
45

56
# Byte-compiled / optimized / DLL files
67
__pycache__/*
150 Bytes
Binary file not shown.

denkmit/settings.py

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'django.contrib.sessions',
4040
'django.contrib.messages',
4141
'django.contrib.staticfiles',
42+
'dbbackup', # django-dbbackup
4243
]
4344

4445
MIDDLEWARE = [
@@ -132,7 +133,14 @@
132133

133134
STATIC_URL = '/static/'
134135

136+
135137
# Default primary key field type
136138
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
137139

138140
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
141+
142+
143+
# # django-dbbackup
144+
145+
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
146+
DBBACKUP_STORAGE_OPTIONS = {'location': f'{BASE_DIR}/data/backups'}

poetry.lock

+17-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pandas = "^1.2.4"
1313
spacy = "^3.0.6"
1414
ankipandas = "^0.3.10"
1515
jupyter = "^1.0.0"
16+
django-dbbackup = "^3.3.0"
1617

1718
[tool.poetry.dev-dependencies]
1819

0 commit comments

Comments
 (0)