#NEWLINE# def _process_ajax_references( self ) : #NEWLINE# #INDENT# '\n            Process `form_ajax_refs` and generate model loaders that\n            will be used by the `ajax_lookup` view.\n        ' #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if self . form_ajax_refs : #NEWLINE# #INDENT# for ( name , options ) in iteritems ( self . form_ajax_refs ) : #NEWLINE# #INDENT# if isinstance ( options , dict ) : #NEWLINE# #INDENT# result [ name ] = self . _create_ajax_loader ( name , name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( options , AjaxModelLoader ) : #NEWLINE# #INDENT# result [ name ] = options #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( '%s.form_ajax_refs can not handle %s types' % ( self , type ( options ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return result