有用过 Flask 的吗?曾经遇过什么坑?

2015-01-20 12:28:21 +08:00
 cmkpl

想用Flask 开小网站,不知道大家遇过什么坑没有?

4599 次点击
所在节点    Python
25 条回复
skywalker
2015-01-20 15:55:50 +08:00
@idblife 本来是自己随便看过的,不过去搜了下还是找到了,当然你要我严格的引用我是没这本事,

仅供参考:

https://news.ycombinator.com/item?id=7105799

This last past year, at DjangoCon US • Chicago, I had the pleasure of sitting at the same table as Jacob Kaplan-Moss for the Speakers dinner prior to the conference. Very cool experience. My first.

I brought up Flask and asked him what he thought of it. I had recently used it for a project for the first time and likely only did so because I was SUPPOSE TO BE FOCUSING on Django and preparing a talk about it. So naturally, I procrasinated and did everything but. It's been on my radar for awhile. I was attracted to it by it's documentation. Turns out, I really enjoyed it. It felt familiar because I've used Django for so long. I brought this up at the dinner table.

Jacob said something that took me by surprise. I can't quote him exactly--the wine and drinks were too good that evening, but it was something to the effect of "Flask is what Django should have been". Another fellow from our table chimed in and added "If only Django had existed before we created Django!" What he ment was, without Django, Flask wouldn't of had such a clear and smooth start. Django taught us a lot.

What I took from this was, both have their place and we have a lot to be thankful for, especially coming from the Django community. In regards to longevity, I think community is a major factor but these two technolgoies are both under Python, and I think the Python community at-large is what matters here. Hearing what Jacob had to say on Flask was sobering. There is no end-all-be-all, and both of these technolgoies have more in common than not.
billlee
2015-01-20 15:59:03 +08:00
blueprint 注册到 '/' 的时候,静态资源注册不到 "/static" 上
bittenbydog
2015-01-20 16:00:12 +08:00
确实木有什么坑啊,用的很爽
ityao
2015-01-20 16:02:41 +08:00
从flask转去sails的无比爽
lmeetr
2016-07-29 23:45:00 +08:00
坑太多了。最大的坑就是没有事务管理,非常的麻烦。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/163789

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX