Add __tablename__ to translation tables

This makes it easier to write introspection scripts.
This commit is contained in:
Petr Viktorin 2013-08-07 14:09:44 +02:00
parent e0beddc573
commit bbb3ab09e3

View file

@ -119,6 +119,7 @@ def create_translation_table(_table_name, foreign_class, relation_name,
Translations = type(_table_name, (object,), {
'_language_identifier': association_proxy('local_language', 'identifier'),
'relation_name': relation_name,
'__tablename__': _table_name,
})
# Create the table object