def is_relationship(model, fieldname):
 mapper = sqlalchemy_inspect(model)
 return (fieldname in mapper.relationships)

def is_relationship ( model , fieldname ) : mapper = sqlalchemy_inspect ( model ) return ( fieldname in mapper . relationships )
decides whether a field is a relationship .