wilsaj/flask-admin — Issue #14: relationship name in wtf form
Author: tonytan4ever
Created: 2011-11-17 20:10:06+00:00
State: open

Currently flask-admin is using the foreign model's name as the fields label/name in a model form:

line 530- line 533
return sa_fields.QuerySelectField(
foreign_model.__name__,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),

It seems to me that it is more intuitive to use relationship's name, rather than a models name,
ie: return sa_fields.QuerySelectField(
prop.key,
query_factory=_query_factory_for(foreign_model,
self.db_session),
allow_blank=local_column.nullable),