Skip to content
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

Quart #976

Closed
wants to merge 4 commits into from
Closed

Quart #976

Show file tree
Hide file tree
Changes from all commits
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
153 changes: 73 additions & 80 deletions dash-renderer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions dash/_callback_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ def assert_context(*args, **kwargs):
if not flask.has_request_context():
raise exceptions.MissingCallbackContextException(
(
'dash.callback_context.{} '
'is only available from a callback!'
).format(getattr(func, '__name__'))
"dash.callback_context.{} "
"is only available from a callback!"
).format(getattr(func, "__name__"))
)
return func(*args, **kwargs)

return assert_context


Expand All @@ -23,19 +24,19 @@ class CallbackContext:
@property
@has_context
def inputs(self):
return getattr(flask.g, 'input_values', {})
return getattr(flask.g, "input_values", {})

@property
@has_context
def states(self):
return getattr(flask.g, 'state_values', {})
return getattr(flask.g, "state_values", {})

@property
@has_context
def triggered(self):
return getattr(flask.g, 'triggered_inputs', [])
return getattr(flask.g, "triggered_inputs", [])

@property
@has_context
def response(self):
return getattr(flask.g, 'dash_response')
return getattr(flask.g, "dash_response")
Loading