Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26946 closed Cleanup/optimization (fixed)

Clarify documentation on customizing the ignored pattern list for `collectstatic`

Reported by: Tobias Kunze Owned by: nobody
Component: Documentation Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The docs (https://docs.djangoproject.com/en/1.10/ref/contrib/staticfiles/#customizing-the-ignored-pattern-list) only include two very terse sentences on the new feature of customizing the ignored pattern list for collectstatic via code instead of invocation parameters. The second sentence ends with

override the ignore_patterns attribute of this class and specify that class path inside your INSTALLED_APPS setting.

If you just follow those instructions without removing 'staticfiles' from the INSTALLED_APPS list, you'll get the error Application labels aren't unique, duplicates: staticfiles.

Change History (5)

comment:1 by Tobias Kunze, 8 years ago

Type: UncategorizedCleanup/optimization

comment:2 by Tim Graham, 8 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

Is this enough?

  • docs/ref/contrib/staticfiles.txt

    diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
    index 5f2e5f9..78f09b9 100644
    a b Customizing the ignored pattern list  
    136136The default ignored pattern list, ``['CVS', '.*', '*~']``, can be customized in
    137137a more persistent way than providing the ``--ignore`` command option at each
    138138``collectstatic`` invocation. Provide a custom :class:`~django.apps.AppConfig`
    139 class, override the ``ignore_patterns`` attribute of this class and specify
    140 that class path inside your :setting:`INSTALLED_APPS` setting:
     139class, override the ``ignore_patterns`` attribute of this class and replace
     140``'django.contrib.staticfiles'`` with that class path in your
     141:setting:`INSTALLED_APPS` setting:
    141142
    142143.. code-block:: python

comment:3 by Tobias Kunze, 8 years ago

I'd say so, thanks! (This issue was actually mentioned via #django on freenode by jleclanche.)

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In ec4a6b33:

Fixed #26946 -- Clarified instructions for customizing collectstatic's ignore_patterns.

comment:5 by Tim Graham <timograham@…>, 8 years ago

In 13c107b:

[1.10.x] Fixed #26946 -- Clarified instructions for customizing collectstatic's ignore_patterns.

Backport of ec4a6b33a9af7f7c266c92b4ffb9b0a49ee5b1eb from master

Note: See TracTickets for help on using tickets.
Back to Top