#15319: _get_next_or_previous_by_FIELD populated from Meta
--------------------------------------------------------+-------------------
Reporter: alexr | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords:
Triage Stage: Design decision needed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
--------------------------------------------------------+-------------------
Comment (by russellm):
Like you note, order_with_respect_to is slightly different, because it
deals with full-model ordering. It wouldn't make sense to define
order_with_respect_to on two different fields -- it needs to be defined as
a property of the entire model. So I'm not so concerned about API
consistency with that particular feature.
Not sure I see why this would be a problem with PKs, though --
get_next_by_FOO is really just MyObj.objects.filter(FOO!__gt=self.FOO)[0],
so I can't see any reason that PK values need to be excluded.
--
Ticket URL: <http://code.djangoproject.com/ticket/15319#comment:5>
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.