Skip to content

Commit f15a385

Browse files
author
Mark Gibbs
committed
Added session state to main callback
1 parent 43a66d5 commit f15a385

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

django_plotly_dash/views.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ def update(request, id, stateless=False, **kwargs):
4040
resp = mFunc()
4141
else:
4242
# Use direct dispatch with extra arguments in the argMap
43-
argMap = {'id':id,
44-
'session':request.session}
43+
app_state = request.session.get("django_plotly_dash",dict())
44+
argMap = {'dash_app_id': id,
45+
'user': request.user,
46+
'session_state': app_state}
4547
resp = app.dispatch_with_args(rb, argMap)
48+
request.session['django_plotly_dash'] = app_state
4649

4750
return HttpResponse(resp.data,
4851
content_type=resp.mimetype)

0 commit comments

Comments
 (0)