3 ms·
god i love django. it could use a little bit of modernization and modularization to ease the json api and deploy pain points, but it's still the best python web
by gv83 3y ago
god i love django. it could use a little bit of modernization and modularization to ease the json api and deploy pain points, but it's still the best python web framework by a long shot and it would be deserving of way more manpower than it has.
but emoji laden docs and 500/month patreon pay better than contributing to established things i guess
- eYrKEC2 3y agoWith regard to JSON API aspects of Django, have you used https://www.django-rest-framework.org/ https://www.django-rest-framework.org/ on top of Django? I find it to be very satisfactory.
- tfeldmann 3y agoDjango-Ninja is fantastic and based on pydantic.
- winrid 3y agoThis. I found DRF gets very confusing with all the abstraction for complicated stuff. For simple APIs, it's very nice (I used it on govscent.org). SidewaysData uses Ninja and I love it so far.
- gv83 3y agoDRF becomes hard to understand when you use magical stuff like class based controllers and so on. stick to functions and it's actually very simple!
- winrid 3y agoYou're absolutely right - however I did not even know I could use functions. I didn't see that in the docs somehow. Also I think I remember with DRF I had trouble generating a good openapi client. With ninja it works really well.
- stavros 3y agoI much prefer Ninja as well. Is it active, these days? It feels like it's got much less of an ecosystem than FastAPI.
- selcuka 3y ago> Is it active, these days? Yes. They are currently migrating to Pydantic 2 which Ninja 1.0 will be based on.
- bodge5000 3y agoDRF has been fantastic in my experience, it fits in so well I often forget it's a plugin and not just a default part of Django
- eYrKEC2 3y agoIt's the only way I've used Django and I love it.
- gv83 3y agoYes, absolutely know DRF. The only problem is that DRF adds another very heavy pile of documentation to read to start working with it, with some footguns (e.g. ModelSerializers being very very slow, at least some years ago). I'd rather have DRF (a subset maybe) inside django. No external dependencies and integrated auth could enable interesting patterns like complete modularization of the admin panel, making it json api driven and making deploys very easy such as `python manage.py generateadmin` and you can load that on S3 or whatever. I also know the existence of whitenoise + many workarounds, but python is already a quirky language, django has its own and its starting to have a huge chunk of incidental complexity (my last django project, very mature codebase, had like 3 libs to work with JWTs...) to work proficiently with. Not to mention the footguns of it! People like options, but with opinionated frameworks I'd rather have lack of them.