Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#13393 closed (duplicate)

Bug introduced with #12977 : can't copy fields with metaclass

Reported by: Stephane "Twidi" Angel Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'm using Django-transmeta for transforming a field into many fields, one for each lang (ex description transformed into description_en and description_fr)

django-transmeta works with a metaclass, and in this metaclass, the new fields are created with copy.copy.

But since the commit #12977, it doesn't work because when this is done, (in the __new__ method of the Transmeta metaclass), the field has no model yet, and then an exception is raised in __setstate__ at ligne 146 of db/models/fields/

Is it a bad way of doing it in django-transmeta ?

Change History (3)

comment:1 Changed 11 years ago by Russell Keith-Magee

Resolution: duplicate
Status: newclosed

Duplicate of #13392, which has been closed in favor of reopening the original problem #13328.

comment:2 Changed 11 years ago by Stephane "Twidi" Angel

oups i thought my #13392 was not posted, sorry

comment:3 Changed 9 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top