Skip to content

Commit

Permalink
Merge pull request #9 from eldarion/add-docs
Browse files Browse the repository at this point in the history
Document storage backend settings
  • Loading branch information
jacobwegner authored Dec 20, 2016
2 parents db13a2d + b35ae9f commit 671e756
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,49 @@ Requirements
--------------

* Django 1.8+

Settings
--------
Set the ``GCS_BUCKET`` environment variable to the GCS bucket to be used
by the storage backend.

Settings can be customized via the `GPAC_STORAGE` settings dict::

GPAC_STORAGE = {
"allow_overwrite": False,
"bucket": "my-bucket",
"cache_control": "public, max-age=3600",
"path_prefix": "",
}


``GPAC_STORAGE["allow_overwrite"]``
===================================

Default: ``False``

If ``True``, the storage backend will overwrite an existing object with
the same name.

``GPAC_STORAGE["bucket"]``
==========================

Default: ``os.environ["GCS_BUCKET"]``

``GPAC_STORAGE["cache_control"]``
=================================

Default: ``public, max-age=3600``

By default, public-readable objects on GCS have a cache duration of 60
minutes. Set ``cache_control`` to ``private, max-age=0`` to disable
public caching of objects saved by the storage backend.

``GPAC_STORAGE["path_prefix"]``
===============================

Default: ``""``

A prefix appended to the path of objects saved by the storage backend.
For example, configuring path_prefix to ``media`` would save
objects to ``my-bucket/media``.

0 comments on commit 671e756

Please sign in to comment.