{{{
@classmethod
def from_db(cls, db, field_names, values):
# Default implementation of from_db() (subject to change and could
# be replaced with super()).
if len(values) != len(cls._meta.concrete_fields):
values = list(values)
values.reverse()
values = [
values.pop() if f.attname in field_names else DEFERRED
for f in cls._meta.concrete_fields
]
new = cls(*values)
instance._state.adding = False
instance._state.db = db
# customization to store the original field values on the instance
instance._loaded_values = dict(zip(field_names, values))
return instance
}}}
Should be
{{{
instance = cls(*values)
instance._state.adding = False
instance._state.db = db
# customization to store the original field values on the instance
instance._loaded_values = dict(zip(field_names, values))
return instance
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28266>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "16df9cb6cc6188a53de32bbdcbb25fba54d83aa5.patch" added.
Patch file
* type: Uncategorized => Bug
* stage: Unreviewed => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28266#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"00093daec9cc61d8af7fcebdbe58e263bea935a3" 00093da]:
{{{
#!CommitTicketReference repository=""
revision="00093daec9cc61d8af7fcebdbe58e263bea935a3"
Fixed #28266 -- Fixed typo in docs/ref/models/instances.txt.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28266#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"84dac491d4cf1901fe22c4035c8609a36f5c2c9a" 84dac491]:
{{{
#!CommitTicketReference repository=""
revision="84dac491d4cf1901fe22c4035c8609a36f5c2c9a"
[1.11.x] Fixed #28266 -- Fixed typo in docs/ref/models/instances.txt.
Backport of 00093daec9cc61d8af7fcebdbe58e263bea935a3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28266#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"7b2d4a95dcd697da7bcf6ab9d3146fdac2e4d81b" 7b2d4a95]:
{{{
#!CommitTicketReference repository=""
revision="7b2d4a95dcd697da7bcf6ab9d3146fdac2e4d81b"
[1.10.x] Fixed #28266 -- Fixed typo in docs/ref/models/instances.txt.
Backport of 00093daec9cc61d8af7fcebdbe58e263bea935a3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28266#comment:4>