#NEWLINE# def get_object_or_404( queryset , * args , **kwargs ) : #NEWLINE# #INDENT# ' replacement of rest_framework.generics and django.shrtcuts analogues ' #NEWLINE# try : #NEWLINE# #INDENT# return queryset . get ( * args , ** kwargs ) #NEWLINE# #UNINDENT# except ( ValueError , TypeError , DoesNotExist ) : #NEWLINE# #INDENT# raise Http404 ( )