#5741: make queryset get() take a default kwarg
---------------------------------------------------+------------------------
Reporter: dcwatson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords: queryset
get default
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by dcwatson):
I'm fine with relegating it to utility-function land. It may have been
nice to mirror dict.get(), but it's by no means difficult to catch the
exception, create a utility function, or even have your own manager get()
method. Or perhaps it would be better suited as a `get_object` method in
`django.shortcuts`. In any case, I don't feel strongly enough about it to
carry the torch, so feel free to wontfix it or defer it to 2.0, when we
can break stuff with reckless abandon!
--
Ticket URL: <http://code.djangoproject.com/ticket/5741#comment:7>
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
-~----------~----~----~----~------~----~------~--~---