#17813: Implement an opposite method for Entry.objects.latest -------------------------------------+------------------------------------- Reporter: tonnzor | Owner: Fandekasp Type: New feature | Status: new Component: Database layer | Version: SVN (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 1 Has patch: 1 | Patch needs improvement: 1 Needs tests: 0 | UI/UX: 0 Easy pickings: 1 | -------------------------------------+------------------------------------- Changes (by Fandekasp):
* owner: nobody => Fandekasp * cc: lemaire.adrien@… (added) * status: reopened => new Comment: I read your code. Tests need to be renamed, it's not LatestTests anymore but FirstOrLatestTests. Same goes for the model.Options.get_latest_by. Don't make any sense to ask for a get_latest_by parameter when performing and first() action. Two solutions: - rename get_latest_by in get_first_or_latest_by . Backward incompatible, but that options touch a very tiny bit of code, and this would be the cleanest solution. - add a new get_first_by field in Options that will behave like get_latest_by. I'll add a new patch with the 2nd solution, and will change it if the core developers agree with the first one. -- Ticket URL: <https://code.djangoproject.com/ticket/17813#comment:5> Django <https://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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.