We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This is an example of how to dynamically update a dashing widget from the django webframework
myproject/settings.py
... DASHING_URL = 'http://localhost:3030/widgets' #replace with actual url DASHING_AUTH_TOKEN = 'YOUR_AUTH_TOKEN' #replace with actual auth token
myapp/views.py
from myproject import settings import json import urllib2 def update_welcome(request): #we'll assume a text widget widget = 'some_text_widget' widget_json = {} widget_json['title'] = request.POST['title'] widget_json['text'] = request.POST['text'] widget_json['auth_token'] = settings.DASHING_AUTH_TOKEN req = urllib.Request(settings.DASHING_URL + widget) response = urllib.urlopen(req, json.dumps(widget_json)) if response: ...