Hacker News new | ask | show | jobs
by andrewstuart 743 days ago
Django isn't batteries included despite everyone saying it is.

Batteries included would mean inclusion of the most basic requirement of almost every web application - some sort of user signup/signin/forgot password auth and cookie/token flow. Django does not include anything for this and leaves it to the user to work out - and this tends to be one of the most complex parts of a new system.

7 comments

> some sort of user signup/signin/forgot password auth and cookie/token flow. Django does not include anything for this and leaves it to the user to work out

But it does: https://docs.djangoproject.com/en/5.0/topics/auth/default/#m...

I stand corrected.
Yes, for me batteries included is starting with your problem and not before the problem. I expect in 2024 to have a Visual Basic 6 for the Web (drag and drop UI/UX and objects behavior) and all I have is MFC [1].

My experience as a casual developer in several programming languages and operating systems (macOS, Windows, Linux...) is that nowadays software development is for teams and not for individuals but it is not a software engineering problem but a community one because the technology we have available is really incredible but you can waste your time with relatively simple problems.

[1] https://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Lib...

And that is why Laravel is maybe the most complete web framework currently. Breeze and Jetstream which are both first party starter kits, adds all of this for you in less that 10 seconds.

Basically if you seriously want to run an online saas business, not using Laravel is like choosing Java over Python back when pg wrote the famous essay.

That's a fair critique. I would say that the Django ecosystem is fairly batteries included though. I used the django-allauth package for this project and it filled in those gaps.

Additionally, in the Python ecosystem your other options are basically flask and fastapi, which are definitely not any form of batteries included.

As a guy who has had a 8 year career largely in Django, I generally agree with this sentiment.

Even though I prefer and am probably much more functional with Django + htmx, my sense is that for general web applications both Rails and Laravel are generally more functional ecosystems.

Most of my Django work has been pretty data heavy or geospatial heavy, in which case I think python and/or geodjango are a great solution. In general, however, if I had a trajectory for more traditional web apps, I’d probably use Rails.

Rails was fun but combined with the uniqueness of Ruby, RoR always felt a little "too magic" for me.
Django people always say this "All you need to do is install this user management lib you're done".

There's at least 10 sophisticated steps to install and configure a user management system for Django and for beginners seeking genuine batteries included they'll have no idea if they are doing it right or wrong, ending up at best with problems and at worst a misconfigured auth system.

Django really should not be recommended to beginners, it's for sophisticated Python devs.

Maybe you are confused with flask? Django has all of the above.
Seems I was wrong.
Exactly, and Django isnt the Python alternative to Rails!
Might I suggest looking at django.contrib.auth.