Hacker News new | ask | show | jobs
by tcbasche 1367 days ago
I think most senior or experienced Python developers tend to steer clear of Django.

It's just that you don't hear about it because it's mostly junior / less experienced developers writing about Django online.

edit: having said that, I wish we would be more skeptical of magic frameworks like Django in the Python community at least. Things like 'get_object_or_404'[1] should be burned to the ground.

[1] https://docs.djangoproject.com/en/4.1/topics/http/shortcuts/...

3 comments

> Things like 'get_object_or_404'[1] should be burned to the ground.

Why? A shortcut like that is useful all the time when writing URL handlers (views in Django).

What does the object have to do with http status codes? It completely entangles the HTTP layer with the database model.
So we should also get rid of `.orElseThrow()` (by default a `NoSuchElementException`)?
If it was .orElseReturn404 then yeah. My point is HTTP codes have no place outside of HTTP endpoints
Sweeping generalisation or what?