#24308: ValueError: Cannot serialize: <bound method SiteManager.get_current of
<django.contrib.sites.models.SiteManager object at 0xb647c9ac>>
-------------------------------------+-------------------------------------
Reporter: jedie | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7
Severity: Normal | Resolution: invalid
Keywords: MigrationWriter, | Triage Stage:
Site | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by charettes):
* status: new => closed
* resolution: => invalid
Comment:
As pointed out in the stacktrace you should refer to the
[https://docs.djangoproject.com/en/dev/topics/migrations/#migration-
serializing documentation].
> Due to the fact !__qualname!__ was only introduced in Python 3, Django
can only serialize the following pattern (an unbound method used within
the class body) on Python 3, and will fail to serialize a reference to it
on Python 2:
> If you are using Python 2, we recommend you move your methods for
upload_to and similar arguments that accept callables (e.g. default) to
live in the main module body, rather than the class body.
--
Ticket URL: <https://code.djangoproject.com/ticket/24308#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.56265ecd1da6a01d98131b0442007eaa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.