#NEWLINE# def get_object( self , pk ) : #NEWLINE# #INDENT# if ( self . model is not None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return self . model . _default_manager . get ( pk = pk ) #NEWLINE# #UNINDENT# except self . model . DoesNotExist : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( "'%s' must define 'queryset' or 'model'" % self . __class__ . __name__ ) )