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

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



With regard to JSON API aspects of Django, have you used https://www.django-rest-framework.org/ on top of Django? I find it to be very satisfactory.


Django-Ninja is fantastic and based on pydantic.


This. 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.


DRF 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!


You'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.


I much prefer Ninja as well. Is it active, these days? It feels like it's got much less of an ecosystem than FastAPI.


> Is it active, these days?

Yes. They are currently migrating to Pydantic 2 which Ninja 1.0 will be based on.


DRF 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


It's the only way I've used Django and I love it.


Yes, 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.




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

Search: