Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#14665 closed (fixed)

collectstatic will recollect some files all the time.

Reported by: apollo13 Owned by: jezdez
Component: Contrib apps Version: master
Severity: Keywords: staticfiles mtime
Cc: apollo13 Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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 Changed 5 years ago by apollo13

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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.

comment:2 Changed 5 years ago by jezdez

  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from assigned to 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.

comment:3 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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