Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every sufficiently large Flask app reimplements half of Django, badly.

I’m the sole maintainer of a Flask app that uses SqlAlchemy, and the experience is similar except that I really miss the admin and auth. However every single flask app ends up using slightly different libraries and architecture, which means that onboarding always takes longer than an equivalent Django app.

Also, I have over a decade of Python experience; I wouldn’t count on people with little Python experience to produce well architected apps in Flask, whereas Django does a lot of guiding the user towards established patterns.

Some parts of Django are antiquated and I do not recommend them (specifically the Forms API really has been superseded by pretty much any newer forms library), but that’s still way less baggage than having to pick up a new stack for every new Flask app.



Curious why you think Django Forms API has been superseded?

Are you recommending people use something like WTForms directly?


When I started using Rest Framework as I had more need for API endpoints than HTML pages I realized the Serializer API was way easier and more intuitive and pulled more weight. Then I began using Pydantic and its API design does pretty much the same except for the rendering part.

I think the rendering aspect in the Forms API has always been a PITA and the validation aspects always left something to be desired. Rendering and validation/serialization should be decoupled IMO, and in that sense the Forms API fails.

Sometimes I wish for the Django admin to be reimplemented in FastAPI/SqlAlchemy as a more modern approach to the same problems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: