Opened 11 years ago

Closed 11 years ago

#16518 closed Uncategorized (fixed)

collectstatic management command fails with jython

Reported by: Josh Smeaton <josh.smeaton@…> Owned by: nobody
Component: contrib.staticfiles Version: 1.3
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


Ticket 14665 makes use of os.stat_float_times to work around an issue where some static files are collected all of the time. Unfortunately, Jython doesn't yet support the function stat_float_times, so the collectstatic management command fails.

This is a problem with Jython to be sure, and I've logged a ticket with the project here.

I still feel that since staticfiles is now an integral part of django, that a minor work around for this should be included in order to continue support of jython as a platform. I'm including a patch with this ticket, made against the 1.3 branch since that is the version I'm currently using. I've also tested that it works in current trunk, so porting it there should be relatively painless if accepted.

Attachments (1)

collectstatic-jython-fix.diff (724 bytes) - added by Josh Smeaton <josh.smeaton@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by Josh Smeaton <josh.smeaton@…>


comment:1 Changed 11 years ago by Josh Smeaton <josh.smeaton@…>

Oh, the stack trace demonstrating the problem:

$ jython collectstatic

Traceback (most recent call last):

File "", line 22, in <module>


File "django/core/management/", line 429, in execute_from_command_line


File "django/core/management/", line 379, in execute


File "django/core/management/", line 261, in fetch_command

klass = load_command_class(app_name, subcommand)

File "django/core/management/", line 68, in load_command_class

return module.Command()

File "django/contrib/staticfiles/management/commands/", line 49, in init


AttributeError: 'module' object has no attribute 'stat_float_times'

Full paths removed to protect the innocent.

comment:2 Changed 11 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [16553]:

Fixed #16518 -- Fixed collectstatic management command to run on Jython. Thanks, Josh Smeaton.

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