3 ms·
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 ex
by tcbasche 4y 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/#get-object-or-404 https://docs.djangoproject.com/en/4.1/topics/http/shortcuts/...
- cutler 4y agoSweeping generalisation or what?
- mwcampbell 4y ago> 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).
- tcbasche 4y agoWhat does the object have to do with http status codes? It completely entangles the HTTP layer with the database model.
- vault 4y agoSo we should also get rid of `.orElseThrow()` (by default a `NoSuchElementException`)?
- tcbasche 4y agoIf it was .orElseReturn404 then yeah. My point is HTTP codes have no place outside of HTTP endpoints