#NEWLINE# def deferred_class_factory( model , attrs ) : #NEWLINE# #INDENT# '\n    Returns a class object that is a copy of "model" with the specified "attrs"\n    being replaced with DeferredAttribute objects. The "pk_value" ties the\n    deferred attributes to a particular instance of the model.\n    ' #NEWLINE# class Meta ( ) : #NEWLINE# #INDENT# proxy = True #NEWLINE# app_label = model . _meta . app_label #NEWLINE# #UNINDENT# name = ( '%s_Deferred_%s' % ( model . __name__ , '_' . join ( sorted ( list ( attrs ) ) ) ) ) #NEWLINE# name = util . truncate_name ( name , 80 , 32 ) #NEWLINE# overrides = dict ( [ ( attr , DeferredAttribute ( attr , name ) ) for attr in attrs ] ) #NEWLINE# overrides [ 'Meta' ] = Meta #NEWLINE# overrides [ '__module__' ] = model . __module__ #NEWLINE# overrides [ '_deferred' ] = True #NEWLINE# return type ( str ( name ) , ( model , ) , overrides )