Skip to content

Commit

Permalink
[docs/sftp] add instructions for handling static & media files (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneier committed Apr 19, 2023
1 parent b8ebf38 commit 7914409
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/backends/sftp.rst
Expand Up @@ -4,6 +4,20 @@ SFTP
Settings
--------

Set the default storage (i.e: for media files) and the static storage (i.e: for
static files) to use the sftp backend::

# django < 4.2
DEFAULT_FILE_STORAGE = "storages.backends.sftpstorage.SFTPStorage"
STATICFILES_STORAGE = "storages.backends.sftpstorage.SFTPStorage"

# django >= 4.2
STORAGES = {
"default": {"BACKEND": "storages.backends.sftpstorage.SFTPStorage"},
"staticfiles": {"BACKEND": "storages.backends.sftpstorage.SFTPStorage"},
}


``SFTP_STORAGE_HOST``
The hostname where you want the files to be saved.

Expand Down

0 comments on commit 7914409

Please sign in to comment.