Live data from Hacker News

What is Flask-Admin?

mrjoes.github.io

31–40 of 42 posts

Re: What is Flask-Admin?

#31
post #27

> Campus Bubble is a single page app with React.js on a frontend and Python services on a backend. We use Flask, SQLAlchemy, Tornado (SockJS push notifications), PostgreSQL, Redis - a pretty standard Flask stack. Can anyone explain how Flask and Tornado could be used together?

They're being used side by side and running in separate processes. For Campus Bubble, tornado app is a relatively simple push broker. Whenever something happens, Flask app pushes notification to a broker and broker pushes them in fan-out fashion to subscribers. I even wrote another blog post a while ago about possible approach: http://mrjoes.github.io/2013/06/21/python-realtime.html

Can't speak much on Flask, but I've seen Tornado used similarly with Django.

Re: What is Flask-Admin?

#32
post #27

> Campus Bubble is a single page app with React.js on a frontend and Python services on a backend. We use Flask, SQLAlchemy, Tornado (SockJS push notifications), PostgreSQL, Redis - a pretty standard Flask stack. Can anyone explain how Flask and Tornado could be used together?

They're being used side by side and running in separate processes. For Campus Bubble, tornado app is a relatively simple push broker. Whenever something happens, Flask app pushes notification to a broker and broker pushes them in fan-out fashion to subscribers. I even wrote another blog post a while ago about possible approach: http://mrjoes.github.io/2013/06/21/python-realtime.html

Wonderful article. Btw, you might find the Pushpin project interesting. It runs as a proxy so you don't need to split your app in two.

Re: What is Flask-Admin?

#33
post #14

I especially like, that I can use Flask-Admin with Peewee ORM - https://peewee.readthedocs.org/en/latest/ - instead of SQLAlchemy, because I feel so much more comfortable with Peewee when doing small CRUD projects. SQLAlchemy is a lot more powerful, but the learning curve (at least for me) is steeper than with Peewee. Flask-Admin is a beautiful piece of software to get Flask backends set up quickly.

Seconding this. Peewee is a breeze to set up and use compared to SQLAlchemy.

Re: What is Flask-Admin?

#34
post #33
post #14

I especially like, that I can use Flask-Admin with Peewee ORM - https://peewee.readthedocs.org/en/latest/ - instead of SQLAlchemy, because I feel so much more comfortable with Peewee when doing small CRUD projects. SQLAlchemy is a lot more powerful, but the learning curve (at least for me) is steeper than with Peewee. Flask-Admin is a beautiful piece of software to get Flask backends set up quickly.

Seconding this. Peewee is a breeze to set up and use compared to SQLAlchemy.

I haven't used it myself, but I took a good look at the code for PeeWee for some changes I wanted to make to Django. It's incredibly well written, and weighs in at about 4000 LoC including 3 database specific dialects (pg, mysql, sqlite).

For anyone interested in how an ORM could be implemented, check it out: https://github.com/coleifer/peewee/blob/master/peewee.py

Re: What is Flask-Admin?

#35
post #19

Earlier quoted context omitted.

The fact that Bootstrap is widespread, and therefore perceived by some unprofessional, does not make a user using it unprofessional, nor does it make the framework unprofessional. Are Django or Flask unprofessional since they are widespread?

Unfortunately, you can't compare development frameworks to UI frameworks. No one knows that you're a dog on the Internet. But anyone without technical knowledge can see a site that's built with the default Bootstrap skin and say - hey, I saw it before. Bootstrap is good and clean framework, it is _great_ for developers. But just because it is so widespread and highly visible, there's some of prejudice around it. None…

I think this prejudice only exists within this community where if you aren't that special snowflake you're not cool. I'd guess 99% of web traffic has no clue what Bootstrap is, what it looks like by default, how it is different when it is skinned. I would guess more than anything that they just think, this is what a website looks like now-a-days.

I'm happy to use it too with very minimal tweaking because it looks good out of the box, way more pleasant than browser defaults, it works well, fairly well maintained.

Re: What is Flask-Admin?

#36
I have the feeling that flask has been neglected for a while. The last release 0.10.1 was on Jun 14, 2013. The mastermind behind Flask, Armin Ronacher, is more into Rust nowadays. I once started a big codebase on Flask and had to move away from it because of some really strange bugs and bad interplay of officially approved packages. The idea behind Flask is nice and there are great plugins out there like Flask-Admin but I don't trust that code base anymore. Also I found a weird bug that kept Flask from answering more than about 500 requests per second and nothing happened since then. For me it was the right decision to jump to Go.

Re: What is Flask-Admin?

#37
I'm still more in favor of Django. There is more to learn about it, but almost all Flask projects that get beyond the weekend-project stage end up reimplementing stuff that is in Django, or working around that lack.

The interplay between ORM, migrations, admin, CRUD, API, Forms, etc is just beautiful. Doing that with SQLAlchemy and the like is possible, but may create a bigger mess than starting out with a slightly less lightweight Django. project.

Re: What is Flask-Admin?

#38
post #10

The great thing about the Django Admin is that - because it was actually part of the Django itself - there is a whole ecosystem of extensions, add-ons, skins etc for it. Any attempts to replace it for Django would have an uphill struggle for that reason alone. This is one side-effect of an opinionated framework - the provision of a default choice facilitates cooperation and prevents fragmentation. (We recently picked…

I've used Django Admin, and it is definitely really cool. However, I don't think it comes close to being a requirement for web development.

The awesome thing about Flask is you really only need to use what you need to use.

Flask also has really great support/docs/etc. I haven't had to google much to find answers to even the more obscure (use xyz supporting library) questions.

Not to be a Flask fanboy... Django definitely has its place. Flask works well for me.

Re: What is Flask-Admin?

#39

I'm still more in favor of Django. There is more to learn about it, but almost all Flask projects that get beyond the weekend-project stage end up reimplementing stuff that is in Django, or working around that lack. The interplay between ORM, migrations, admin, CRUD, API, Forms, etc is just beautiful. Doing that with SQLAlchemy and the like is possible, but may create a bigger mess than starting out with a slightly l…

When using Flask, I like the fact that for form handling with an ORM, there's a flask-wtforms plugin, a wtforms-sqlalchemy plugin, and a flask-sqlalchemy plugin. This is part of the reason why I'm sticking with Django.

Re: What is Flask-Admin?

#40
post #39

I'm still more in favor of Django. There is more to learn about it, but almost all Flask projects that get beyond the weekend-project stage end up reimplementing stuff that is in Django, or working around that lack. The interplay between ORM, migrations, admin, CRUD, API, Forms, etc is just beautiful. Doing that with SQLAlchemy and the like is possible, but may create a bigger mess than starting out with a slightly l…

When using Flask, I like the fact that for form handling with an ORM, there's a flask-wtforms plugin, a wtforms-sqlalchemy plugin, and a flask-sqlalchemy plugin. This is part of the reason why I'm sticking with Django.

This makes no sense. You like something about Flask so you're sticking with Django?
Post reply on HN