Is there any way to alter the url of a FileField in Django?

9 views
Skip to first unread message

McKinley

unread,
Jul 7, 2016, 1:08:07 PM7/7/16
to Django users
FileField objects have a url attribute. How do I alter it? The docs say it is read-only. Is there even a way to alter the underlying storage class? I am working with a migrated database and can't get the urls of the old directory structure to apply the new deployment. The MEDIA_ROOT is set fine, upload_to is being used in models, so new objects get saved correctly, but old ones are expected to be in the MEDIA_ROOT by the application, which is not the case.
Reply all
Reply to author
Forward
0 new messages