id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 19234 can't adapt type error with models artscoop93.info@… nobody "Sometimes with Django you want to perform operations which need to pickle model objects, you end up with a '''can't adapt type''' error. This is often true when one uses ''celery'', for example. I have a simple way to resolve this issue for model classes, but I wonder if it's relevant to add this code to Django itself. This would be a new function in the django.db.models.base.Model class {{{ def __reduce__(instance): names = [f.name for f in instance._meta.fields] attributes = dict([(name, getattr(instance, name)) for name in names]) return (instance.__class__, (), attributes) }}} Worth adding or not ?" New feature closed Database layer (models, ORM) 1.4 Normal needsinfo pickle, celery Unreviewed 0 0 0 0 0 0