Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Render dash app layout based on incoming POST request

$
0
0

@sagarman wrote:

I’m looking to create a dash based graph service serving multiple clients at a time where dash layout can be dynamically created / updated. I understand that dash doesn’t have this kind of ‘push’ functionality so I created a route using dash server and tried to pass the body of POST request to dash app by defining a serve_layout function. But the app doesn’t reload. Following is part of the relevant code:

@server.route(’/draw’, methods = [‘POST’])
def result():
if request.method == ‘POST’:
serve_layout(‘request’)
return render_template(“index.html”)

def serve_layout(post_body):
# Construct layout

dash_app.layout = serve_layout

Any suggestions on how to proceed? Thanks in advance.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images