-
Notifications
You must be signed in to change notification settings - Fork 3
Description
First of all, if this code is dead, just let me know. It hasn't been touched in quite a while.
I tried to use the code as is, and ran into a problem simply executing:
from database_storage import DatabaseStorage
I believe this is due to some problems with changes between Python 2 and Python 3. I was able to make a local copy of database_storage.py and get it to work by modifying a couple of imports:
from io import StringIO
from urllib.parse import urljoin
and then changing the call to urljoin within the url method to be just
result = urljoin(self.base_url, name).replace('\\', '/')
I also had to do the following to make the Django migration framework happy:
from django.utils.deconstruct import deconstructible
@deconstructible
class DatabaseStorage(Storage):
Without this makemigrations complains that the ImageField that uses DatabaseStorage isn't serializable.
Can you verify these changes are correct, and if so, integrate them so I can reinstall the module using pip?
I can submit a pull request if you'd prefer.