Opened 8 years ago

Last modified 8 years ago

#26896 closed Bug

FileSystemStorage no longer accepts reverse_lazy as base_url — at Version 1

Reported by: tpazderka Owned by: nobody
Component: File uploads/storage Version: 1.8
Severity: Normal Keywords: storage, reverse_lazy
Cc: Claude Paroz Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Changes introduced with commit [fb9d8f06] fixing #22717 causes FileSystemStorage to evaluate the content of base_url uppon initialization.
This causes issues if the base_url is defined as reverse_lazy as it is resolved and can cause ImportError.

I think that the laziness of the base_url should be preserved. Either the check for the trailing slash can me moved to path generation or the __init__ can be updated to expect reverse_lazy as base_url.

Change History (2)

comment:1 by Tim Graham, 8 years ago

Description: modified (diff)

Could you provide a test for tests/file_storage/tests.py that demonstrates your use case?

by tpazderka, 8 years ago

Patch for tests/file_storage/tests.py

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