#11007: Add django.db.Model.changes(self) that returns a dict of differences
---------------------------------------------------+------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
---------------------------------------------------+------------------------
Comment (by thebitguru):
Replying to [comment:6 lukeplant]:
> The ``.endswith("_ptr")`` checks could have some false positives, if the
developer happened to name a field "foo_ptr", which is not forbidden IIRC.
Thanks, Luke. Would we want to use something like the following?
`fields = [field.name for field in self._meta._fields() if not field.rel
or (field.rel and not field.rel.parent_link)]`
If so, then I can attach an updated patch.
Also, do we need tests for this functionality before it can be considered
for the standard code?
--
Ticket URL: <http://code.djangoproject.com/ticket/11007#comment:7>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---