#NEWLINE# def patch_mongoengine_field( field_name ) : #NEWLINE# #INDENT# "\n    patch mongoengine.[field_name] for comparison support\n    becouse it's required in django.forms.models.fields_for_model\n    importing using mongoengine internal import cache\n    " #NEWLINE# from mongoengine import common #NEWLINE# field = common . _import_class ( field_name ) #NEWLINE# for k in [ '__eq__' , '__lt__' , '__hash__' , 'attname' ] : #NEWLINE# #INDENT# if ( not ( k in field . __dict__ ) ) : #NEWLINE# #INDENT# setattr ( field , k , djangoflavor . DjangoField . __dict__ [ k ] )