Exemplo n.º 1
0
 def update_translation_table():
     from camelot.model.i18n import Translation
     from sqlalchemy.orm.session import Session
     t = Translation.get_by(source=source, language=language)
     if not t:
         t = Translation(source=source, language=language)
     t.value = value
     Session.object_session( t ).flush( [t] )
Exemplo n.º 2
0
 def update_translation_table():
     from camelot.model.i18n import Translation
     from sqlalchemy.orm.session import Session
     t = Translation.get_by(source=source, language=language)
     if not t:
         t = Translation(source=source, language=language)
     t.value = value
     Session.object_session( t ).flush( [t] )