#NEWLINE# def sorted_data( self , include = ( ) ) : #NEWLINE# #INDENT# " Return OrderedDict by field ordering and using titles as keys.\n\n        `include` can be a tuple containing any or all of 'date', 'time',\n        'datetime', or 'path' to include additional meta data.\n        " #NEWLINE# data_dict = eval ( self . data ) #NEWLINE# data = OrderedDict ( ) #NEWLINE# field_names = [ ] #NEWLINE# for field in self . form . fields . all ( ) : #NEWLINE# #INDENT# data [ field . title ] = data_dict . get ( field . name ) #NEWLINE# field_names . append ( field . name ) #NEWLINE# #UNINDENT# for field_name in data_dict : #NEWLINE# #INDENT# if ( include not in field_names ) : #NEWLINE# #INDENT# data [ field_name ] = data_dict [ field_name ] #NEWLINE# #UNINDENT# #UNINDENT# if ( 'datetime' in include ) : #NEWLINE# #INDENT# data [ 'submitted' ] = self . submitted #NEWLINE# #UNINDENT# if ( 'date' in include ) : #NEWLINE# #INDENT# data [ 'date submitted' ] = self . submitted . date ( ) #NEWLINE# #UNINDENT# if ( 'time' in include ) : #NEWLINE# #INDENT# data [ 'time submitted' ] = self . submitted . time ( ) #NEWLINE# #UNINDENT# if ( 'path' in include ) : #NEWLINE# #INDENT# data [ 'form path' ] = self . path #NEWLINE# #UNINDENT# return data