Changes between Initial Version and Version 2 of Ticket #33384
- Timestamp:
- Dec 25, 2021, 4:48:16 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33384
- Property Summary Add `get_or_none` method → Add get_or_none method
-
Ticket #33384 – Description
initial v2 1 1 In Django we have `get` method for getting model objects. 2 2 I have seen so many projects that implement `get_or_none` method in their projects. 3 There are also some python ORMs that have this feature for example `tortoise-orm`, `ormar`, etc. 3 4 I know that we have `get_object_404` but sometimes we don't want to raise an exception. 4 5 so I think `get_or_none` would be kinda useful, what do you think?