mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
364 B
12 lines
364 B
from channels.layers import get_channel_layer
|
|
from asgiref.sync import async_to_sync
|
|
|
|
from sapl.painel import views
|
|
|
|
channel_layer = get_channel_layer()
|
|
|
|
def get_dados_painel_final(id):
|
|
json_data = views.get_dados_painel(id)
|
|
print(json_data)
|
|
print('\n')
|
|
async_to_sync(channel_layer.group_send)('painel', {'type':'send_data', 'message': json_data})
|
|
|