#NEWLINE# def value_from_datadict( self , data , files , name ) : #NEWLINE# #INDENT# value = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for key_fieldname in sorted ( [ i for i in data if i . startswith ( ( name + '_key_' ) ) ] ) : #NEWLINE# #INDENT# key = data . get ( key_fieldname , '' ) #NEWLINE# if ( not key ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# val = data . get ( key_fieldname . replace ( '_key_' , '_value_' ) , '' ) #NEWLINE# value [ key ] = i #NEWLINE# #UNINDENT# return json . dumps ( value )