This is why I love Flask
from flask import Flask
from flask import render_template, url_for
app = Flask(__name__)
@app.route('/')
def homepage():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
url_for('static', filename='/stylesheets/compass_foundation.css')
Cool! This is a single page app using Flask. Oh and you can run a test server with “python <name_of_file>.py”. Don’t need no full-blown feature heavy framework, no stinkin ORM, no form handling, authentication, etc for this simple project. Somehow I feel cleaner using Flask… How much of Django am I actually utilizing? I’m beginning to see the light about python web microframeworks.
14 Notes/ Hide
-
yeseniauio09 liked this
-
murphytii0 liked this
-
womainkee liked this
-
alexkehayias posted this