mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Add django-dbbackup app
- https://github.com/un1t/django-cleanup - Backup location defaults to temp directory
This commit is contained in:
parent
689445a9bd
commit
5f6909d32a
@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/1.10/ref/settings/
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import tempfile
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
@ -56,12 +57,13 @@ INSTALLED_APPS = [
|
|||||||
'build.apps.BuildConfig',
|
'build.apps.BuildConfig',
|
||||||
|
|
||||||
# Third part add-ons
|
# Third part add-ons
|
||||||
'django_filters',
|
'django_filters', # Extended filter functionality
|
||||||
'rest_framework',
|
'dbbackup', # Database backup / restore
|
||||||
'crispy_forms',
|
'rest_framework', # DRF (Django Rest Framework)
|
||||||
'import_export',
|
'crispy_forms', # Improved form rendering
|
||||||
'django_cleanup',
|
'import_export', # Import / export tables to file
|
||||||
'qr_code',
|
'django_cleanup', # Automatically delete orphaned MEDIA files
|
||||||
|
'qr_code', # Generate QR codes
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@ -174,3 +176,7 @@ CRISPY_TEMPLATE_PACK = 'bootstrap'
|
|||||||
|
|
||||||
# Use database transactions when importing / exporting data
|
# Use database transactions when importing / exporting data
|
||||||
IMPORT_EXPORT_USE_TRANSACTIONS = True
|
IMPORT_EXPORT_USE_TRANSACTIONS = True
|
||||||
|
|
||||||
|
# Settings for dbbsettings app
|
||||||
|
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||||
|
DBBACKUP_STORAGE_OPTIONS = {'location': tempfile.gettempdir()}
|
@ -3,6 +3,7 @@ psycopg2>=2.8.1 # PostgreSQL package
|
|||||||
pillow>=5.0.0 # Image manipulation
|
pillow>=5.0.0 # Image manipulation
|
||||||
djangorestframework>=3.6.2 # DRF framework
|
djangorestframework>=3.6.2 # DRF framework
|
||||||
django_filter>=1.0.2 # Extended filtering options
|
django_filter>=1.0.2 # Extended filtering options
|
||||||
|
django-dbbackup==3.2.0 # Database backup / restore functionality
|
||||||
coreapi>=2.3.0 # API documentation
|
coreapi>=2.3.0 # API documentation
|
||||||
pygments>=2.2.0 # Syntax highlighting
|
pygments>=2.2.0 # Syntax highlighting
|
||||||
tablib>=0.13.0 # Import / export data files
|
tablib>=0.13.0 # Import / export data files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user