#NEWLINE# def _get_helpers( self ) : #NEWLINE# #INDENT# if ( not hasattr ( settings , 'DAGUERRE_PREADJUSTMENTS' ) ) : #NEWLINE# #INDENT# raise CommandError ( NO_ADJUSTMENTS ) #NEWLINE# #UNINDENT# dp = settings . DAGUERRE_PREADJUSTMENTS #NEWLINE# helpers = [ ] #NEWLINE# try : #NEWLINE# #INDENT# for ( model_or_iterable , adjustments , lookup ) in dp : #NEWLINE# #INDENT# if isinstance ( model_or_iterable , six . string_types ) : #NEWLINE# #INDENT# ( app_label , model_name ) = model_or_iterable . split ( '.' ) #NEWLINE# model_or_iterable = get_model ( app_label , model_name ) #NEWLINE# #UNINDENT# if ( isinstance ( model_or_iterable , six . class_types ) and issubclass ( model_or_iterable , Model ) ) : #NEWLINE# #INDENT# iterable = model_or_iterable . objects . all ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( model_or_iterable , QuerySet ) : #NEWLINE# #INDENT# iterable = model_or_iterable . _clone ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# iterable = model_or_iterable #NEWLINE# #UNINDENT# #UNINDENT# helper = AdjustmentHelper ( iterable , lookup = adjustment , generate = True ) #NEWLINE# for adjustment in adjustments : #NEWLINE# #INDENT# helper . adjust ( adjustment ) #NEWLINE# #UNINDENT# helper . _finalize ( ) #NEWLINE# helpers . append ( helper ) #NEWLINE# #UNINDENT# #UNINDENT# except ( ValueError , TypeError , LookupError ) : #NEWLINE# #INDENT# raise CommandError ( BAD_STRUCTURE ) #NEWLINE# #UNINDENT# return helpers