示例#1
0
文件: signals.py 项目: bram2w/baserow
def table_created(sender, table, user, **kwargs):
    transaction.on_commit(lambda: broadcast_to_group.delay(
        table.database.group_id,
        {
            "type": "table_created",
            "table": TableSerializer(table).data
        },
        getattr(user, "web_socket_id", None),
    ))
示例#2
0
def table_created(sender, table, user, **kwargs):
    transaction.on_commit(lambda: broadcast_to_group.delay(
        table.database.group_id,
        {
            'type': 'table_created',
            'table': TableSerializer(table).data
        },
        getattr(user, 'web_socket_id', None)
    ))
示例#3
0
文件: signals.py 项目: bram2w/baserow
def tables_reordered(sender, database, order, user, **kwargs):
    transaction.on_commit(lambda: broadcast_to_group.delay(
        database.group_id,
        {
            "type": "tables_reordered",
            "database_id": database.id,
            "order": order,
        },
        getattr(user, "web_socket_id", None),
    ))
示例#4
0
文件: signals.py 项目: bram2w/baserow
def table_deleted(sender, table_id, table, user, **kwargs):
    transaction.on_commit(lambda: broadcast_to_group.delay(
        table.database.group_id,
        {
            "type": "table_deleted",
            "database_id": table.database_id,
            "table_id": table_id,
        },
        getattr(user, "web_socket_id", None),
    ))
示例#5
0
def table_deleted(sender, table_id, table, user, **kwargs):
    transaction.on_commit(lambda: broadcast_to_group.delay(
        table.database.group_id,
        {
            'type': 'table_deleted',
            'database_id': table.database_id,
            'table_id': table_id
        },
        getattr(user, 'web_socket_id', None)
    ))