diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-04-15 21:05:06 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-04-22 09:56:06 +0200 |
| commit | f4c2b8e04a297f627a8e722d78eda6cbf5cc8a6e (patch) | |
| tree | 171aec71cfb88114f4a99c72e2cb4fe943cb19bb /docs/ref | |
| parent | 6f5fcfc6d26238810df599b7862d7c6bc0fd303a (diff) | |
Fixed #20189 -- Allowed customizing staticfiles ignored_patterns list
Thanks Tim Graham for the review.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/staticfiles.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt index e09bdaad49..3e70d82f7e 100644 --- a/docs/ref/contrib/staticfiles.txt +++ b/docs/ref/contrib/staticfiles.txt @@ -128,6 +128,24 @@ For a full list of options, refer to the commands own help by running:: $ python manage.py collectstatic --help +Customizing the ignored pattern list +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 1.10 + +The default ignored pattern list, ``['CVS', '.*', '*~']``, can be customized in +a more persistent way than providing the ``--ignore`` command option at each +``collectstatic`` invocation. Provide a custom :class:`~django.apps.AppConfig` +class, override the ``ignore_patterns`` attribute of this class and specify +that class path inside your :setting:`INSTALLED_APPS` setting: + +.. code-block:: python + + from django.contrib.staticfiles.apps import StaticFilesConfig + + class MyStaticFilesConfig(StaticFilesConfig): + ignore_patterns = [...] # your custom ignore list + ``findstatic`` -------------- |
