Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makemigrations error #35

Open
aztrock opened this issue May 22, 2019 · 2 comments
Open

makemigrations error #35

aztrock opened this issue May 22, 2019 · 2 comments

Comments

@aztrock
Copy link

aztrock commented May 22, 2019

$ 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

@Gilbishkosma
Copy link

i am getting the same error

@Gilbishkosma
Copy link

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants