#NEWLINE# def format( self , instance ) : #NEWLINE# #INDENT# fields = self . model . es . get_fields ( ) #NEWLINE# obj = dict ( [ ( field , self . serialize_field ( instance , field ) ) for field in fields ] ) #NEWLINE# completion_fields = instance . Elasticsearch . completion_fields #NEWLINE# for field_name in ( completion_fields or [ ] ) : #NEWLINE# #INDENT# suggest_name = '{0}_complete' . format ( field_name ) #NEWLINE# obj [ suggest_name ] = self . serialize_field ( instance , field_name ) #NEWLINE# #UNINDENT# return obj