[Django] #20189: Collectstatic ignore list expansion on a per project basis

31 views
Skip to first unread message

Django

unread,
Apr 3, 2013, 10:36:03 AM4/3/13
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+--------------------
Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+--------------------
Currently collectstatic gets its default ignores from this code.
{{{
ignore_patterns = options['ignore_patterns']
if options['use_default_ignore_patterns']:
ignore_patterns += ['CVS', '.*', '*~']
}}}

In some of my projects I need more than this, and the only way to get that
behavior is to remember the command line options and patterns. Working on
many different projects all the time, this is problematic for me.

I'd like to propose a settings file addition that would pull those ignore
patterns from settings.COLLECT_STATIC_IGNORE or something similar.

I'd be willing to write the code if this is accepted. We could leave the
default alone, but allow people to put various things in the list to make
deployment less of a hassle.

Part of the issues for me include sass files, themes associated with sass
files, "uncompiled" javascript that needs to be served on debug, but does
not need to be in the production static folder.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 14, 2013, 10:37:47 AM4/14/13
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+-------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by tomask):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Hi,

This is the file that the code is in
https://github.com/django/django/blob/master/django/contrib/staticfiles/management/commands/collectstatic.py

This seems like a cool feature to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:1>

Django

unread,
May 23, 2013, 6:32:22 AM5/23/13
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Kamu):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:2>

Django

unread,
Jul 21, 2013, 8:56:15 AM7/21/13
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Elvard):

* cc: tomas.ehrlich@… (added)
* has_patch: 0 => 1
* version: 1.5 => master


--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:3>

Django

unread,
Jul 21, 2013, 8:57:46 AM7/21/13
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------

Comment (by Elvard):

I've added STATICFILES_IGNORE_PATTERNS setting. Implementation was mostly
straightforward. The only problem is backward compatibility.

The default value of STATICFILES_IGNORE_PATTERNS is ['CVS', '.*', '*~'],
the same as default patterns hard-coded in management command. When user
passes --no-default-ignore option, these default patterns are substracted
and deprecation warning raised.

Need review for this, also for docs. Tests passed.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:4>

Django

unread,
Jun 25, 2014, 1:10:38 PM6/25/14
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1


Comment:

We try to avoid new settings at all costs, although I don't have any
alternate suggestions in this case. Anyway, the patch needs to be updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:5>

Django

unread,
Jun 26, 2014, 1:47:47 AM6/26/14
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Elvard):

* needs_better_patch: 1 => 0


Comment:

Patch updated, see PR https://github.com/django/django/pull/2854

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:6>

Django

unread,
Jul 1, 2014, 9:21:06 AM7/1/14
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by jezdez):

* needs_better_patch: 0 => 1


Comment:

This is simple, don't add a global setting but a parameter to the
staticfile app config. That's where such things belong now.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:7>

Django

unread,
Apr 15, 2016, 3:08:57 PM4/15/16
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: 1 => 0


Comment:

Tried to provide a new [https://github.com/django/django/pull/6460 PR]
with the app config way.

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:8>

Django

unread,
Apr 21, 2016, 7:42:35 PM4/21/16
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+-------------------------------------

Reporter: mark0978 | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:9>

Django

unread,
Apr 22, 2016, 3:57:00 AM4/22/16
to django-...@googlegroups.com
#20189: Collectstatic ignore list expansion on a per project basis
-------------------------------------+-------------------------------------
Reporter: mark0978 | Owner: nobody
Type: New feature | Status: closed
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"f4c2b8e04a297f627a8e722d78eda6cbf5cc8a6e" f4c2b8e]:
{{{
#!CommitTicketReference repository=""
revision="f4c2b8e04a297f627a8e722d78eda6cbf5cc8a6e"
Fixed #20189 -- Allowed customizing staticfiles ignored_patterns list

Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20189#comment:10>

Reply all
Reply to author
Forward
0 new messages