Changes between Initial Version and Version 2 of Ticket #33384


Ignore:
Timestamp:
Dec 25, 2021, 4:48:16 AM (3 years ago)
Author:
MojixCoder
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33384

    • Property Summary Add `get_or_none` methodAdd get_or_none method
  • Ticket #33384 – Description

    initial v2  
    11In Django we have `get` method for getting model objects. 
    22I have seen so many projects that implement `get_or_none` method in their projects.
     3There are also some python ORMs that have this feature for example `tortoise-orm`, `ormar`, etc.
    34I know that we have `get_object_404` but sometimes we don't want to raise an exception. 
    45so I think `get_or_none` would be kinda useful, what do you think?
Back to Top