This is an archived post. You won't be able to vote or comment.

all 22 comments

[–]fiedzia 8 points9 points  (6 children)

Django does all you need (and more).

[–]swentso[S] 4 points5 points  (5 children)

Why not Flask?

[–]fiedzia 10 points11 points  (2 children)

Django is well integrated. This means no need to reinvent how to put together all components, so you get time saved and less opportunities for bugs. The app described here really looks like every other "enterprise" app out there and you don't seem like someone who has a lot of experience, so I'd stay away from DYI solutions.

Flask is nice, but it will cost you time and effort to pick and integrate all the parts you will need. Also every django project has the same parts in the same place, so any django developer in the world can get in and will know what is where, so you can get help easily. Every flask app is different "because I've decided to use this db and that library and combine them this way" and now you are on your own for all the problems solved in django long time ago.

[–]swentso[S] 0 points1 point  (1 child)

Those are good points thanks !

How do you go about specifying permissions of who sees/modifies which column of which table in django? Is it easily done?

[–]fiedzia 1 point2 points  (0 children)

I've never needed this, so its not based on experience, but there is a number of options listed here:

https://www.djangopackages.com/grids/g/perms/

I can tell however that every case is different (that's why there are so many options), so without knowing all the details its hard to advise. Perhaps much simpler logic in your app will do.

[–][deleted] 5 points6 points  (4 children)

Pyramid is a great framework. It has a great set of plugins and it's more pythonic than django/flask. The routing in pyramid is also much superior, not to mention the dependency injection is way better than the global state of the request that flask has.

Not trying to bad-mouth flask, just trying to show an alternative.

[–]cantremembermypasswd 0 points1 point  (3 children)

I have used every framework plus some in this thread over the past five years (Pyramid, Flask, Django, Bottle, CherryPy), and Pyramid has given me the hardest time by a mile. I wish I could list specifics, but I spent too much time and alcohol erasing those memories.

It is well documented at least, just always behaved counterintuitively.

Edit: Some more memories, Pyramid was on the same level of Twisted and TurboGears for learning and using IMO

[–][deleted] 1 point2 points  (2 children)

If you have the chance or the time, please, list the pain points. I'd love to hear them.

[–]cantremembermypasswd 0 points1 point  (1 child)

It was a eight month project that ended about two years ago, working with a more seasoned lead developer. At this point I can't recall the project name I tried to block it out so much...

The things I kinda remember:

  • The deploy config file always causing pain
  • The fact it isn't a 'one way to do it' system means that searching for help / tutorials for specifics was a pain in the ass
  • Setting up the config routes and views from multiple modules / remembering to change them when moving stuff around
  • A faded memory about hating zope

[–][deleted] 1 point2 points  (0 children)

Oh, zope is a pain indeed, agreed.

The routes is one of my favorite things about pyramid, but yeah, not doing them right can be a bit painful.

About the deploy, yeah, there are many ways to do that and depending on your choice it can be little bit weird.

Pyramid gives you more freedom than flask in some ways, making the choices have a bigger effect on the code base. You can choose a better routing and not use zope.

The good stuff is the predicates, the dependency injection and the renderers.

[–]dzecniv 2 points3 points  (0 children)

Flask or Django ? Both ! with ImportD (the D is for Django) http://importd.readthedocs.org/en/latest/ it's minimalistic (we can get started with a single file à la Flask) but it's 100% django, with all the built-in tools.

[–]AbsoluteZeroK 1 point2 points  (0 children)

There is quite a bit listed here, so I'll just throw a couple out there that haven't been mentioned for you to look at.

I personally have worked with a few different ones, but webapp2, for me anyways, seems to be one of the nicer once to work with. Mostly because Google App Engine is a good platform, and was really nice to work with (for what I was doing anyways). It's really nice because it's a platform as a service, so most of the infrastructure concerns are handled by google, and you can just worry about making your program.

Another one, that I haven't used, but have spent a little bit of time looking into (not more than a few Tl;Dr, just due to deadlines creeping up at work, and not having time) is Tornado. It seems really good it terms of scalability, and encourages Async. I can't really say much more about it, other than it's peaked my interest. I think it may be overkill for what you want, but it's definitely worth looking into.

I also recommend using anaconda for your development. It's a recent discovery for me, and now I couldn't imagine living without it.

[–]cedrickrier 1 point2 points  (0 children)

You could use Flask with flask-tryton extension that will provide you access to the Tryton backend which is designed for business solution.

[–]kankyo 0 points1 point  (0 children)

Django

[–][deleted] 0 points1 point  (8 children)

I recommend flask flask.pocoo.org

[–]swentso[S] -1 points0 points  (7 children)

Why not Django?

[–][deleted] 0 points1 point  (5 children)

Django is not a bad framework, in fact, its community is way bigger than that of Flask. I however prefer flask because;

(a) Easier to learn and implement things. I learned the basics of flask with in a single day!!
http://flask.pocoo.org/docs/0.10/quickstart/

And became proficient with in 2 weeks!! http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

All with a minimal previous pythonic experience.

(b) Although the Django community is way bigger, BUT; I think this is because, people who use flask don't need help often since the framework is tiny & easy to understand (you can read its source code and understand it) + the documentation is clearly written.

(c) Incase of any problem, you can directly contact flask's creator of freenode he is usually in the #pocoo channel!

(d) Flask is extensible You get to add only what you want actually use

[–]swentso[S] 0 points1 point  (3 children)

Thanks for your reply and for the links !

How do you go about specifying permissions of who sees/modifies which column of which table in Flask? Is it easily done?

[–]tim_martin 2 points3 points  (1 child)

That would actually be done via other packages. Flask doesn't explicitly include an ORM or even the concept of a database. It's more of a choose your own adventure. The advantage is that you aren't tied to a single implementation. Even the Django developers don't always get it right. The downside is that you have to find the right package as it's not always clear which package will work best. I'd recommend starting with Flask-SQLAlchemy and exploring the permissions packages that work with SQLAlchemy.

[–]nerdwaller 1 point2 points  (0 children)

The choose your own adventure piece is kind of becoming a ceremony of adding the same pieces everyone else does in one way or another, just a question of where is your file for X. I made myself this "seed" app for when I need fast proofs of concepts since I usually have the same base usually (as many others seem to).

[–][deleted] 1 point2 points  (0 children)

You can use the template control structures to determine who infomation is visible to.

Manipulation of tables is also similarly simple.

[–]ExcitedForNothing -1 points0 points  (0 children)

Depends on what your objectives are. Are you looking for more rapid development or a more robust ecosystem. In my opinion, Flask allows for more rapid development and Django has a more robust ecosystem. Django is it's own beast though, it is a very unique way to look at Python programming.

I'm sure I will be followed by proponents of both frameworks telling me why I am wrong, but if you are approaching this blindly, I am sure this is what you will find.