#14665 closed (fixed)
collectstatic will recollect some files all the time.
Reported by: | Florian Apolloner | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Keywords: | staticfiles mtime | |
Cc: | Florian Apolloner | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Apparently getmtime returns different results due to some rounding errors thx to using floats for the time. os.stat_float_times(False) in collectstatic fixes it. Another solution would be to make the comparison accept an small offset (0.146508 seconds aren't that useful after all).
Change History (4)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Status: | new → assigned |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [14533]) Fixed #14524, #14582, #14617, #14665 and #14667 -- Tweaked staticfiles app.
- Updated StaticFilesHandler and AdminMediaHandler to make use of the 404 handler if needed.
- Updated runserver management command to serve static files only in DEBUG mode (or if specified the --insecure option) and if the staticfiles app is in INSTALLED_APPS. Also added an option to disable serving completely (--nostatic).
- Added check in debug mode if STATICFILES_* settings are different to MEDIA_* settings.
- Removed a faulty PendingDeprecationWarning in AdminMediaHandler that is triggered every time runserver is used.
- Fixed an issue with the modification time checks when running collectstatic.
- Extended and refined documentation.
Thanks to everyone for input, especially to Carl Meyer, Ted Kaemming and
Adam Vandenberg for patches.
Note:
See TracTickets
for help on using tickets.
I also think, that the comparison should be dest_mtime >= source_mtime, as I doubt we can rely on the backend (read any non local backend) to not change the mtime.