3 ms·
Point 2) is not about implementing authentication or even the user model from scratch. It is about using a custom user model, something the django documentation
by ketzu 5y ago
Point 2) is not about implementing authentication or even the user model from scratch. It is about using a custom user model, something the django documentation explicitly recommends doing, for the same reason the author recommends it: Changing it later is a pain.
A custom user model doesn't even have to contain anything, it can be empty. See: https://docs.djangoproject.com/en/4.0/topics/auth/customizing/#substituting-a-custom-user-model https://docs.djangoproject.com/en/4.0/topics/auth/customizin...
"If you’re starting a new project, it’s highly recommended to set up a custom user model, even if the default User model is sufficient for you."
Adding an empty, but custom, user model derived from the base model could be the default. But it isn't, instead there is this recommendation, which you will only read when it is too late (on your first project).
- Nextgrid 5y agoI upvoted the article just because of this point as I myself had to go through the pain of moving to a custom user model on an already-deployed app with real data (so nuking the migrations and starting fresh wasn't an option). I agree that most other points are garbage though.