oshipka/vm_gen/templates/_relationship_py

4 lines
224 B
Plaintext
Raw Normal View History

2020-06-03 16:00:51 +02:00
[[ column.name ]]_id = db.Column(db.Integer, db.ForeignKey('[[ column.name ]].id'))
[[ column.name ]] = db.relationship('[[ column.name|snake_to_camel ]]', backref=db.backref("[[ name|camel_to_snake|pluralize ]]"))