mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #19326 -- Added first() and last() methods to QuerySet
This commit is contained in:
committed by
Anssi Kääriäinen
parent
d595b61aca
commit
ea9a0857d4
@@ -253,6 +253,11 @@ Minor features
|
||||
allow users to specify the primary keys of objects they want to dump.
|
||||
This option can only be used with one model.
|
||||
|
||||
* Added ``QuerySet`` methods :meth:`~django.db.models.query.QuerySet.first`
|
||||
and :meth:`~django.db.models.query.QuerySet.last` which are convenience
|
||||
methods returning the first or last object matching the filters. Returns
|
||||
``None`` if there are no objects matching.
|
||||
|
||||
Backwards incompatible changes in 1.6
|
||||
=====================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user