Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix host access in SFTPStorage #204

Merged
merged 1 commit into from
Sep 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions storages/backends/sftpstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import stat
from datetime import datetime

from django.conf import settings
from django.core.files.base import File
from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible
Expand All @@ -25,10 +24,10 @@
@deconstructible
class SFTPStorage(Storage):

def __init__(self, host, params=None, interactive=None, file_mode=None,
def __init__(self, host=None, params=None, interactive=None, file_mode=None,
dir_mode=None, uid=None, gid=None, known_host_file=None,
root_path=None, base_url=None):
self._host = host or settings('SFTP_STORAGE_HOST')
self._host = host or setting('SFTP_STORAGE_HOST')

self._params = params or setting('SFTP_STORAGE_PARAMS', {})
self._interactive = setting('SFTP_STORAGE_INTERACTIVE', False) \
Expand Down