Skip to content

Widgets update syntax #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tricky double-sending fix… (more)
All of our messages seem to be being sent twice! Not sure where that’s coming from. This is a temporary fix that synced with the new frontend postMessage hopefully we can revert this.
  • Loading branch information
theengineear committed Jan 10, 2015
commit 964d1933554e71cd0b3b7305f27f10fa427e3546
4 changes: 4 additions & 0 deletions plotly/widgets/graph_widget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from collections import deque
import json
import os
import random
import string

# TODO: protected imports?
from IPython.html import widgets
Expand Down Expand Up @@ -88,6 +90,8 @@ def _handle_registration(self, event_type, callback, remove):

def _handle_outgoing_message(self, message):
message['plotlyDomain'] = plotly.plotly.get_config()['plotly_domain']
message['taskID'] = ''.join([random.choice(string.ascii_letters)
for _ in range(20)])
if self._graphId == '':
self._clientMessages.append(message)
else:
Expand Down