diff options
| author | Jannis Leidel <jannis@leidel.info> | 2012-05-16 13:21:46 +0200 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2012-05-16 13:21:50 +0200 |
| commit | 5f75ac91df2ef1c19946f65e08aa50165f061cd4 (patch) | |
| tree | b26e5faf50074bc8b84696adf4e33d2bea31658c /docs | |
| parent | 085c03e08b29fafc92ef49c2a3717ec23cf1c500 (diff) | |
Fixed #17896 -- Added file_hash method to CachedStaticFilesStorage to be able to customize the way the hashed name of a file is created. Thanks to mkai for the initial patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/staticfiles.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt index 1dbd00b299..2bdf825316 100644 --- a/docs/ref/contrib/staticfiles.txt +++ b/docs/ref/contrib/staticfiles.txt @@ -348,6 +348,15 @@ CachedStaticFilesStorage :setting:`CACHES` setting named ``'staticfiles'``. It falls back to using the ``'default'`` cache backend. + .. method:: file_hash(name, content=None) + + .. versionadded:: 1.5 + + The method that is used when creating the hashed name of a file. + Needs to return a hash for the given file name and content. + By default it calculates a MD5 hash from the content's chunks as + mentioned above. + .. _`far future Expires headers`: http://developer.yahoo.com/performance/rules.html#expires .. _`@import`: http://www.w3.org/TR/CSS2/cascade.html#at-import .. _`url()`: http://www.w3.org/TR/CSS2/syndata.html#uri |
