#15035 closed (fixed)
collectstatic does not support remote backends that implement modified_time
| Reported by: | Ben Davis | Owned by: | Jannis Leidel |
|---|---|---|---|
| Component: | Contrib apps | Version: | 1.3-beta |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
My CDN (rackspace cloud files) supports getting the modified time of an object. If I implement modified_time() in my cloud storage app, we get an exception:
Traceback (most recent call last):
File "./manage.py", line 26, in <module>
management.execute_from_command_line()
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/management/__init__.py", line 429, in execute_from_command_line
utility.execute()
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/contrib/staticfiles/management/commands/collectstatic.py", line 78, in handle_noargs
self.copy_file(source, prefix, storage, **options)
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/contrib/staticfiles/management/commands/collectstatic.py", line 130, in copy_file
self.destination_storage.path(destination))
File "/home/ben/Projects/SavidWorks/ellableu/.env/src/django/django/core/files/storage.py", line 86, in path
raise NotImplementedError("This backend doesn't support absolute paths.")
NotImplementedError: This backend doesn't support absolute paths.
This can be fixed by setting destination_is_link to False when self.distination_local is False. Patch is attached.
Attachments (1)
Change History (6)
by , 15 years ago
| Attachment: | collectstatic_remote_modified_time_fix.diff added |
|---|
comment:1 by , 15 years ago
| Component: | Uncategorized → Contrib apps |
|---|---|
| milestone: | → 1.3 |
| Owner: | changed from to |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
| Version: | SVN → 1.3-beta |
comment:2 by , 15 years ago
Yup, works for me. Thanks!
Also thanks for leading me to discover that Django has an official git clone -- that makes me all types of happy :-D
comment:3 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Can you please check if this also works?
https://github.com/jezdez/django/compare/master...trac-15035