my-emacs-d/snippets/python-mode/translatable_model
2017-09-25 11:26:31 +02:00

14 lines
306 B
Plaintext

# -*- mode: snippet -*-
# name: Translatable Flask-SQLAlchemy model
# key: tmodel
# --
class ${1:name}(Translatable, db.Model):
__tablename__ = '${2:tablename}s'
id = db.Column(db.Integer, primary_key=True)
class $1Translation(translation_base($1)):
__tablename__ = '$2_translations'
$0