Re: deconstruct returns 3-tuple?

2021-09-18 Thread Tim Graham
That documentation is for serializing classes. There's a note box that says, "This return value is different from the deconstruct() method for custom fields which returns a tuple of four items."

Re: deconstruct returns 3-tuple?

2021-09-18 Thread Andrew Godwin
As the note in that section explains, that is for custom *classes*, not for custom *fields*. Your observation is correct when applied to field deconstruction methods, but not for the system talked about there which lets you do it for arbitrary classes (as part of the values in field

deconstruct returns 3-tuple?

2021-09-18 Thread Christian González
Hi, before I issue a bugreport, I'll ask here first. On https://docs.djangoproject.com/en/3.2/topics/migrations/#adding-a-deconstruct-method I can read that deconstruct() returns a 3-tuple. When I see the code in django.db.models.fields.__init__.py, Field.deconstruct() does a return