mirror of
https://github.com/fergalmoran/dss.api.git
synced 2025-12-31 13:50:24 +00:00
Settings
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,8 +11,7 @@ media/*
|
||||
build/*
|
||||
_working/*
|
||||
static/CACHE/*
|
||||
dss/localsettings.py
|
||||
dss/storagesettings.py
|
||||
dss/devsettings.py
|
||||
dss/celery_settings.py
|
||||
dss.conf
|
||||
dss/debugsettings.py
|
||||
|
||||
@@ -3,6 +3,8 @@ import subprocess
|
||||
from django.core.management.base import LabelCommand, CommandError
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
import pexpect
|
||||
from dropbox.client import ChunkedUploader
|
||||
|
||||
from dss import settings
|
||||
import tarfile
|
||||
import dropbox
|
||||
@@ -54,6 +56,7 @@ def _upload_to_dropbox(type, backup_file, remote_file):
|
||||
try:
|
||||
with open(backup_file, "rb") as f:
|
||||
client = dropbox.client.DropboxClient(settings.DSS_DB_BACKUP_TOKEN)
|
||||
uploader = ChunkedUploader(client=client, file_obj=backup_file)
|
||||
response = client.put_file("{0}/{1}".format(type, remote_file), f, overwrite=True)
|
||||
|
||||
os.remove(backup_file)
|
||||
|
||||
Reference in New Issue
Block a user