def get_object_or_None(klass, *args, **kwargs):
 queryset = _get_queryset(klass)
 try:
  return queryset.get(*args, **kwargs)
 except queryset.model.DoesNotExist:
  return None

def get_object_or_None ( klass , * args , ** kwargs ) : queryset = _get_queryset ( klass ) try : return queryset . get ( * args , ** kwargs ) except queryset . model . DoesNotExist : return None
uses get() to return an object or none if the object does not exist .