def convert_ReferenceProperty(model, prop, kwargs):
 kwargs['reference_class'] = prop.reference_class
 kwargs.setdefault('allow_blank', (not prop.required))
 return ReferencePropertyField(**kwargs)

def convert_ReferenceProperty ( model , prop , kwargs ) : kwargs [ 'reference_class' ] = prop . reference_class kwargs . setdefault ( 'allow_blank' , ( not prop . required ) ) return ReferencePropertyField ( ** kwargs )
returns a form field for a db .