-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/plotly/dash into standalo…
…ne_dash-renderer
- Loading branch information
Showing
10 changed files
with
119 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
dash_core_components==0.43.0 | ||
dash_core_components==0.43.1 | ||
dash_html_components==0.13.5 | ||
dash_flow_example==0.0.5 | ||
dash-dangerously-set-inner-html | ||
git+git://github.com/plotly/dash-renderer@custom_hooks#egg=dash-renderer | ||
-e git://github.com/plotly/dash-renderer.git@master#egg=dash_renderer | ||
percy | ||
selenium | ||
mock | ||
tox | ||
tox-pyenv | ||
mock | ||
six | ||
plotly==3.6.0 | ||
plotly==3.6.1 | ||
requests[security] | ||
flake8 | ||
pylint==1.9.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import functools | ||
import flask | ||
|
||
from . import exceptions | ||
|
||
|
||
def has_context(func): | ||
@functools.wraps(func) | ||
def assert_context(*args, **kwargs): | ||
if not flask.has_request_context(): | ||
raise exceptions.MissingCallbackContextException( | ||
'dash.callback.{} is only available from a callback!'.format( | ||
getattr(func, '__name__') | ||
) | ||
) | ||
return func(*args, **kwargs) | ||
return assert_context | ||
|
||
|
||
# pylint: disable=no-init | ||
class CallbackContext: | ||
@property | ||
@has_context | ||
def inputs(self): | ||
return getattr(flask.g, 'input_values', {}) | ||
|
||
@property | ||
@has_context | ||
def states(self): | ||
return getattr(flask.g, 'state_values', {}) | ||
|
||
@property | ||
@has_context | ||
def triggered(self): | ||
return getattr(flask.g, 'triggered_inputs', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.37.0' | ||
__version__ = '0.38.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters