News for hackers. Stuff that matters.
Re:Flask 0.7 Released (Python Web Framework) by DasIch on Tuesday June 28, 2011 @10:02AM (#2705406)
Flask has more features, more and better documentation, a bigger community and ecosystem as well as more developers behind it.

Furthermore Bottle does magic that is frowned upon by some people.

Re:Flask 0.7 Released (Python Web Framework) by dochtman on Tuesday June 28, 2011 @10:23AM (#2705479)
Then again, I also dislike some of the magic in Flask.
Re:Flask 0.7 Released (Python Web Framework) by the_mitsuhiko on Tuesday June 28, 2011 @11:11AM (#2705690)
We're getting rid of all the magic we can avoid. With 0.7 barely any magic is left with the notable exception of backwards compatibility.
Re:Flask 0.7 Released (Python Web Framework) by louis14 on Tuesday June 28, 2011 @10:26AM (#2705491)
For what reason?
Re:Flask 0.7 Released (Python Web Framework) by hackoder on Tuesday June 28, 2011 @11:00AM (#2705650)
Magic can come to haunt you when you get stuck. For e.g. flask has thread locals where the request variable gets populated with the current request's context dynamically.

For the most part though, Flask is very magic free and the source is small enough to quickly figure out whats going on.

Re:Flask 0.7 Released (Python Web Framework) by dochtman on Tuesday June 28, 2011 @10:42AM (#2705578)
Because I just dislike magic.
Re:Flask 0.7 Released (Python Web Framework) by jsherer on Tuesday June 28, 2011 @10:12AM (#2705435)
"does magic that is frowned upon by some people."

Can you elaborate?

Re:Flask 0.7 Released (Python Web Framework) by the_mitsuhiko on Tuesday June 28, 2011 @10:16AM (#2705452)
I would describe it more carefully. Bottle's advantage that it's self contained and in a single file, however bottle's design also hides away the application object from you which makes it quite hard to have more than one of them. It is possible with the stacked object thing and I think they changed it even to make it possible to do what Flask did, but when Flask started at least there was a design difference there.

By now I really would like to see them merge, but Bottle wants to stick to the design idea of just having one file which Flask will never be able to do because of the dependencies.

Re:Flask 0.7 Released (Python Web Framework) by louis14 on Tuesday June 28, 2011 @10:19AM (#2705461)
Any reasons why they should merge if they are so different?
Re:Flask 0.7 Released (Python Web Framework) by alvivar on Tuesday June 28, 2011 @12:08PM (#2705931)
Merge is an excellent idea when two projects, frameworks, etc have the same goals (Not necessarily the same features). For example The Pylons Project taking BFG as is base and making Pyramid, with all the experience from Pylons community and BFG. This will make changes on both sides of the community but brings a new Framework with the possibility of improvement. I guess the idea is take the best from both frameworks y make a new one, better, with a big community, and a lot of knowledge from the previous experiences.
Re:Flask 0.7 Released (Python Web Framework) by sigzero on Tuesday June 28, 2011 @10:39AM (#2705562)
Consolidation of resources and talents. That is all I can think of.
Re:Flask 0.7 Released (Python Web Framework) by DasIch on Tuesday June 28, 2011 @10:24AM (#2705485)
An example would be that Bottle creates an application object implicitly and assumes that all resources(templates, static files, etc.) are relative to the cwd. However the WSGI specification doesn't define what the cwd points to so you have to work around that for some servers.

If you use Flask you create the application object explicitly and pass it the name of the module, relative to which Flask looks up resources.

Re:Flask 0.7 Released (Python Web Framework) by oinksoft on Tuesday June 28, 2011 @10:36AM (#2705548)
> assumes that all resources(templates, static files, etc.)

Reading the source, I see no evidence of this.

https://github.com/defnull/bottle/blob/master/bottle.py#L161...

Re:Flask 0.7 Released (Python Web Framework) by DasIch on Tuesday June 28, 2011 @10:58AM (#2705642)
I must have been mistaken for static files, for templates however it is the case:

https://github.com/defnull/bottle/blob/master/bottle.py#L263...

You can override it but you would have to do that for every call to `template` or by monkey patching `TEMPLATE_PATH`.

Re:Flask 0.7 Released (Python Web Framework) by oinksoft on Tuesday June 28, 2011 @11:24AM (#2705746)
In the big picture, I don't see having to write a wrapper function for template rendering with a fixed template_lookup argument being a big deal (I'm basing all of my judgments on source alone, I've only fiddled with either framework).
Re:Flask 0.7 Released (Python Web Framework) by DasIch on Tuesday June 28, 2011 @02:51PM (#2706716)
It's still a problem for modularity, something like Flask's blueprints are basically impossible for Bottle.