Re:Building a fullstack app with Flask and HTMx
by dannywarner on Tuesday March 29, 2022 @11:24AM
(#30843834)
Agree. Simple Flask and HTML gets you a long way and is easy to deploy and manage.
[ Parent
| on HN ]
Re:Building a fullstack app with Flask and HTMx
by jacktheturtle on Tuesday March 29, 2022 @12:29PM
(#30844718)
Might want to give this a try. Thanks for sharing!
Re:Building a fullstack app with Flask and HTMx
by dfinninger on Tuesday March 29, 2022 @01:50PM
(#30846035)
Flask will take you pretty far. I'm not sure I would build a build a business around it, but it's the easiest thing I've found for just getting some code up on the web.
This tutorial is a pretty in-depth guide that incrementally adds more features to a flask app: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...
By no means do you need to use everything in here, but I reference it from time to time. This is plenty:
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def index():
return "<h1>hello world<h1>"
@app.route("/foo")
def foo():
return render_template("foo.html", vars={"foo": "bar"})
if __name__ == "__main__":
app.run()