Opened 12 years ago

Closed 12 years ago

#18857 closed Bug (needsinfo)

collectstatic does not take into account modified dependencies

Reported by: motiejus Owned by: nobody
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Assume the following:

  1. styles.css includes other.css
  2. ./manage.py collectstatic
  3. modify other.css
  4. ./manage.py collectstatic

Expected outcome:
styles.css is changed (and hence a new file is created in STATIC_ROOT) to reflect new other.css

Actual outcome:
styles.css remains unchanged, and it wrongly includes the old other.css.

Test case is far from perfect, because it changes global state (style.css and other.css). I tried to copy files I am modifying to a separate temporary directory, but for some reason it didn't work out. See the temp_staticfiles_dirs decorator in the patch, might be that only a bit is missing (clearing cache or something).

Attachments (1)

django_staticfiles.patch (4.4 KB ) - added by motiejus 12 years ago.

Download all attachments as: .zip

Change History (6)

by motiejus, 12 years ago

Attachment: django_staticfiles.patch added

comment:1 by motiejus, 12 years ago

There are two bugs in this ticket. One is line 440 in my patch. Once that one is fixed, we can concentrate on lines 452-474.

comment:2 by motiejus, 12 years ago

Patch needs improvement: set

comment:3 by motiejus, 12 years ago

Summary: collectstatic post-processing does not take into account modified dependencies[CachedStaticFilesStorage] collectstatic does not take into account modified dependencies

comment:4 by Jannis Leidel, 12 years ago

Summary: [CachedStaticFilesStorage] collectstatic does not take into account modified dependenciescollectstatic does not take into account modified dependencies

comment:5 by Jannis Leidel, 12 years ago

Resolution: needsinfo
Status: newclosed

I can't reproduce this, and I suspect it's a misconfiguration, where an item of the STATICFILES_DIRS setting is inside the STATIC_ROOT directory or something similar.

Your patch doesn't seem to use the decorator you've wrote, please provide more information to understand the issue.

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