Opened 10 years ago

Last modified 10 years ago

#23724 closed New feature

Overwrite mode in django — at Version 1

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

Description (last modified by Prathik Rajendran M)

We had an issue in the production server where the files in STATIC_ROOT were not being replaced by the ones in the individual apps. As a solution for this we ran collectstatic with the -c option. This worked but what happened was the the entire static root was erased, this static root was configured to point to the static files folder in the container app which resulted in some of the files being permanently deleted because collectstatic first clears the folder then collects the staticfiles. While it is true that it was incorrect to set it up this way, it would be ideal if it wouldn't have deleted the files.

Another problem was that due to some reason the source files had a timestamp lesser than the destination files, this could have been due to a caching mechanism but this resulted in the source files not being collected.

To solve for the above issues we need a overwrite method which would overwrite the source files no matter what the timestamp and it would not perform the copy if the source and the destination are the same.

Pull request: https://github.com/django/django/pull/3434

Change History (1)

comment:1 by Prathik Rajendran M, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top