Skip to content

Commit

Permalink
[2.1.x] Fixed #29677 -- Doc'd return value of StaticFilesStorage.post…
Browse files Browse the repository at this point in the history
…_process().

Backport of 7f6b013 from master
  • Loading branch information
timgraham authored and carltongibson committed Aug 16, 2018
1 parent ef30633 commit 5628a8a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/ref/contrib/staticfiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ as the base URL.

.. method:: storage.StaticFilesStorage.post_process(paths, **options)

This method is called by the :djadmin:`collectstatic` management command
after each run and gets passed the local storages and paths of found
files as a dictionary, as well as the command line options.
If this method is defined on a storage, it's called by the
:djadmin:`collectstatic` management command after each run and gets passed the
local storages and paths of found files as a dictionary, as well as the command
line options. It yields tuples of three values:
``original_path, processed_path, processed``. The path values are strings and
``processed`` is a boolean indicating whether or not the value was
post-processed, or an exception if post-processing failed.

The :class:`~django.contrib.staticfiles.storage.CachedStaticFilesStorage`
uses this behind the scenes to replace the paths with their hashed
Expand Down

0 comments on commit 5628a8a

Please sign in to comment.