示例#1
0
def handle_tp_data_update(**kwargs):
    tp = kwargs["instance"]
    if "object_list" in kwargs:
        data_updater.get(TranslationProject)(
            tp, object_list=kwargs["object_list"]).update()
    else:
        data_tool.get(TranslationProject)(tp).update()
示例#2
0
文件: receivers.py 项目: arky/pootle
def handle_tp_data_update(**kwargs):
    tp = kwargs["instance"]
    if "object_list" in kwargs:
        data_updater.get(TranslationProject)(
            tp,
            object_list=kwargs["object_list"]).update()
    else:
        data_tool.get(TranslationProject)(tp).update()
示例#3
0
def test_data_tool_store(store0):
    assert data_tool.get() is None
    assert data_tool.get(store0.__class__) is StoreDataTool
    assert isinstance(store0.data_tool, StoreDataTool)
    assert store0.data_tool.context is store0
示例#4
0
def test_data_tool_store(store0):
    assert data_tool.get() is None
    assert data_tool.get(store0.__class__) is StoreDataTool
    assert isinstance(store0.data_tool, StoreDataTool)
    assert store0.data_tool.context is store0
示例#5
0
文件: models.py 项目: YESLTD/pootle
 def data_tool(self):
     return data_tool.get(self.__class__)(self)
示例#6
0
文件: models.py 项目: ta2-1/pootle
 def data_tool(self):
     return data_tool.get(self.__class__)(self)
示例#7
0
def handle_tp_data_update(**kwargs):
    tp = kwargs["instance"]
    data_tool.get(TranslationProject)(tp).update()
示例#8
0
def handle_store_data_update(**kwargs):
    store = kwargs["instance"]
    data_tool.get(Store)(store).update()
示例#9
0
文件: receivers.py 项目: arky/pootle
def handle_store_data_update(**kwargs):
    store = kwargs.get("instance")
    data_tool.get(Store)(store).update()