Merge pull request #771 from karyon/remote_storages_docs
Remote storages docs: clarify result
This commit is contained in:
@@ -47,7 +47,7 @@ apps can be integrated.
|
|||||||
|
|
||||||
#. Make sure the :attr:`~django.conf.settings.COMPRESS_ROOT` and STATIC_ROOT_
|
#. Make sure the :attr:`~django.conf.settings.COMPRESS_ROOT` and STATIC_ROOT_
|
||||||
settings are equal since both apps need to look at the same directories
|
settings are equal since both apps need to look at the same directories
|
||||||
when to do their job.
|
when doing their job.
|
||||||
|
|
||||||
#. You need to create a subclass of the remote storage backend you want
|
#. You need to create a subclass of the remote storage backend you want
|
||||||
to use; below is an example of the boto S3 storage backend from
|
to use; below is an example of the boto S3 storage backend from
|
||||||
@@ -79,6 +79,15 @@ apps can be integrated.
|
|||||||
:attr:`~django.conf.settings.COMPRESS_URL` (e.g.
|
:attr:`~django.conf.settings.COMPRESS_URL` (e.g.
|
||||||
``"http://compressor-test.s3.amazonaws.com/"``).
|
``"http://compressor-test.s3.amazonaws.com/"``).
|
||||||
|
|
||||||
|
In the end it might look like this::
|
||||||
|
|
||||||
|
STATIC_ROOT = '/path/to/staticfiles'
|
||||||
|
COMPRESS_ROOT = STATIC_ROOT
|
||||||
|
STATICFILES_STORAGE = 'mysite.storage.CachedS3BotoStorage'
|
||||||
|
COMPRESS_STORAGE = STATICFILES_STORAGE
|
||||||
|
STATIC_URL = 'https://compressor-test.s3.amazonaws.com/'
|
||||||
|
COMPRESS_URL = STATIC_URL
|
||||||
|
|
||||||
.. _CDN: http://en.wikipedia.org/wiki/Content_delivery_network
|
.. _CDN: http://en.wikipedia.org/wiki/Content_delivery_network
|
||||||
.. _Amazon S3: https://s3.amazonaws.com/
|
.. _Amazon S3: https://s3.amazonaws.com/
|
||||||
.. _boto: http://boto.cloudhackers.com/
|
.. _boto: http://boto.cloudhackers.com/
|
||||||
|
|||||||
Reference in New Issue
Block a user