def _convert_many_to_one(self, col_name, label, description,<EOL>lst_validators, filter_rel_fields,<EOL>form_props):
query_func = self._get_related_query_func(col_name, filter_rel_fields)<EOL>get_pk_func = self._get_related_pk_func(col_name)<EOL>extra_classes = None<EOL>allow_blank = True<EOL>if not self.datamodel.is_nullable(col_name):<EOL><INDENT>lst_validators.append(validators.DataRequired())<EOL>allow_blank = False<EOL><DEDENT>else:<EOL><INDENT>lst_validators.append(validators.Optional())<EOL><DEDENT>form_props[col_name] =QuerySelectField(label,<EOL>description=description,<EOL>query_func=query_func,<EOL>get_pk_func=get_pk_func,<EOL>allow_blank=allow_blank,<EOL>validators=lst_validators,<EOL>widget=Select2Widget(extra_classes=extra_classes))<EOL>return form_props<EOL>
Creates a WTForm field for many to one related fields,
will use a Select box based on a query. Will only
work with SQLAlchemy interface.