#NEWLINE# def contribute_to_class( self , cls , name ) : #NEWLINE# #INDENT# super ( JSONField , self ) . contribute_to_class ( cls , name ) #NEWLINE# def get_json( model_instance ) : #NEWLINE# #INDENT# return self . get_db_prep_value ( getattr ( model_instance , self . attname , None ) , force = True ) #NEWLINE# #UNINDENT# setattr ( cls , ( 'get_%s_json' % self . name ) , get_json ) #NEWLINE# def set_json( model_instance , value ) : #NEWLINE# #INDENT# return setattr ( model_instance , self . attname , self . to_python ( value ) ) #NEWLINE# #UNINDENT# setattr ( cls , ( 'set_%s_json' % self . name ) , set_json ) #NEWLINE# setattr ( cls , name , Creator ( self , lazy = self . lazy ) )