Bug introduced with #12977 : can't copy fields with metaclass
|Reported by:||Twidi||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.2-beta|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm using django-transmeta to create fields for many langs
Say i have a field "description" and with the metaclass provided by django-transmeta, this field is transformed in description_fr + description_en and so on.
But with commit #12977, it doesn't work anymore, as the work is done by copying field (in the __new__ method of the Transmeta metaclass), and at this stage, fields have not models and then __setstate__ (in db/models/fields/__init__.py) fails (because of self.model)
No idea how to make a clean copy of the field without copy.copy...
Change History (4)
comment:1 Changed 5 years ago by gabrielhurley
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to invalid
- Status changed from new to closed