Hello everyone! I recently posted a patch that adds two methods to django.shortcuts: get_list_or_none() and get_object_or_none(). These function identically to their get _x_or_404 cousins, with one exception: they return empty QuerySets rather than raising a 404. I've used get_list_or_none() several times in my own projects, but in ticket #2659 Adrian dismissed get_object_or_none() as scope creep. Since then, however, objects.none() has been added, which would greatly enhance the utility of such methods (rather than just returning false).
http://code.djangoproject.com/ticket/11352 Any comments/feedback/improvements are, of course, welcome. Thanks! Chuck Harmston http://chuckharmton.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
