django-queued-storage
django-queued-storage copied to clipboard
makemigrations error
$ python manager makemigrations
...
File "/opt/project/lib/python3.5/site-packages/django/db/migrations/serializer.py", line 332, in serializer_factory
"topics/migrations/#migration-serializing" % (value, get_docs_version())
ValueError: Cannot serialize: <queued_storage.backends.QueuedStorage object at 0x7f06cf150e10>
There are some values Django cannot serialize into migration files.
For more, see https://docs.djangoproject.com/en/2.2/topics/migrations/#migration-serializing
$python --version Python 3.7.2
i am getting the same error
After some search i found out that applying a @deconstructible decorator on the QueuedStorage class fix this issue. more about Deconstructible
This is how i applied the decorator:
from queued_storage.backends import QueuedStorage
from django.utils.deconstruct import deconstructible
QueuedStorage = deconstructible(QueuedStorage)
queued_s3storage = QueuedStorage(
'django.core.files.storage.FileSystemStorage',
'storages.backends.s3boto.S3BotoStorage')