Black Lives Matter. Please consider donating to Black Girls Code today.

Can i use Dash like Flask MVC modle?

Dash is Python and HTML to show page.
but the Processing template It’s very troublesome.

can i use like this ?

from flask import Flask, render_template

APP.PY
@app.route(’/user/’)
def user(name):
return render_template(‘user.html’, name=name)

user.html
<[quote=“max, post:1, topic:7770, full:true”]
Dash is Python and HTML to show page.
but the Processing template It’s very troublesome.

can i use like this ?

from flask import Flask, render_template

APP.PY
@app.route(’/user/’)
def user(name):
return render_template(‘user.html’, name=name)

user.html

< body>
< h1>hi,{name}
< /body>

maybe is okay just i don’t know?

:open_mouth::open_mouth::open_mouth::open_mouth::open_mouth::open_mouth:

You could define a Flask off the app.server instance, but this would be a page that is independent of the dash app. You can’t mix Flask routes and Dash rendering with callbacks as the Dash client requires the layout to be serialized into JSON that it can parse.

It looks so complicated.

I’m now trying to use plot.js+flask to make pages.
image
image

What is the correct grammar? Can I directly output the values of X and Y?