I have seen zen and it is flask



you forgetting flask-restless for that js MV frontend.
 
Code:
from werkzeug.exceptions import ImATeapot
@app.route('dickroll')
def dickroll():
    raise ImATeapot
 
What was your everyday stack before Flask?

After three years of large projects on Rails, my current slew of sideprojects are much simpler. Mostly one-page apps or apps with simple front-ends that do lifting behind the scenes.

I've been enjoying Flask's brethren Sinatra (Ruby) and Express (Node) in production.

I'll go back to Rails in a heartbeat on a conventionally complex app with database associations, authentication, and the works. But I find writing glue code and plumbing to be intellectually stimulating on smaller projects when I have the time to write it, debug it, and shop for tools to hitch up. Feel like a kid in a candy shop.

Do you have any experience with Django?
 
What was your everyday stack before Flask?

After three years of large projects on Rails, my current slew of sideprojects are much simpler. Mostly one-page apps or apps with simple front-ends that do lifting behind the scenes.

I've been enjoying Flask's brethren Sinatra (Ruby) and Express (Node) in production.

I'll go back to Rails in a heartbeat on a conventionally complex app with database associations, authentication, and the works. But I find writing glue code and plumbing to be intellectually stimulating on smaller projects when I have the time to write it, debug it, and shop for tools to hitch up. Feel like a kid in a candy shop.

Do you have any experience with Django?

Yes Django was my preferred framework, but it felt like it was bigger than what I could fit in my brain's working set at once. I also don't like being told how to organise my app, with flask I can pretty much do what I want.

The past few months have been more bots than webapps, but I am moving back towards webapps for a while.
 
Well, here is the example from the Flask site for Hello World.

from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()

Here is the one for php
Hello World!

Ok, i know its senseless, but i love it
 
Er... shouldn't the PHP be


::emp::

I was waiting for that comment :)

php is parsing anything outsite the "< ? php ? >" tag as html.

so, the example is a valid php code - without any php code.
That was the joke, btw.
 
Flask is everything Django should've been. Initially, Django made a lot of claims about using modular components, but in my experience dealing with the overwhelming number of global settings and Django magic makes this more switching out components more trouble than it's worth.

Here's a simple use case:

Populate a DB with a scraper. Access that DB with a web app.

If I use the Django ORM in the web app, it's a good idea to use it when creating records with the scraper. So what, the scraper should depend on Django?

Using Flask, I can create one DB module that uses SQLAlchemy and is shared between the scraper and the app. So instead of writing Django ORM code twice or using prepared statements in my scraper that I hope match what the ORM expects, I just use a library that doesn't depend on a web framework.

Yes, you can use the Django ORM without Django, I've done it, but it's retarded.
 
Flask is everything Django should've been. Initially, Django made a lot of claims about using modular components, but in my experience dealing with the overwhelming number of global settings and Django magic makes this more switching out components more trouble than it's worth.

Here's a simple use case:

Populate a DB with a scraper. Access that DB with a web app.

If I use the Django ORM in the web app, it's a good idea to use it when creating records with the scraper. So what, the scraper should depend on Django?

Using Flask, I can create one DB module that uses SQLAlchemy and is shared between the scraper and the app. So instead of writing Django ORM code twice or using prepared statements in my scraper that I hope match what the ORM expects, I just use a library that doesn't depend on a web framework.

Yes, you can use the Django ORM without Django, I've done it, but it's retarded.

This guy right here. He gets it!

Check out flask-bootstrap, it follows the bootstrap philosophy, took me 5 minutes to install it, read the docs, and get my first template displayed.