Quoting the Docs 
<https://docs.djangoproject.com/en/3.1/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project>
:

*> If you’re starting a new project, it’s highly recommended to set up a 
custom user model, even if the default User 
<https://docs.djangoproject.com/en/3.1/ref/contrib/auth/#django.contrib.auth.models.User>
 model 
is sufficient for you. This model behaves identically to the default user 
model, but you’ll be able to customize it in the future if the need arises:*

But this means: My code won't be reusable.

Some lines below:

*> Reusable apps shouldn’t implement a custom user model. A project may use 
many apps, and two reusable apps that implemented a custom user model 
couldn’t be used together. If you need to store per user information in 
your app, use a ForeignKey 
<https://docs.djangoproject.com/en/2.2/ref/models/fields/#django.db.models.ForeignKey>
 or OneToOneField 
<https://docs.djangoproject.com/en/2.2/ref/models/fields/#django.db.models.OneToOneField>
 to settings.AUTH_USER_MODEL as 
described below.*

I think both sentences somehow contradict, since AFAIK it is highly 
recommended to
write reusable apps.

What do you recommend

*reusable App   XOR    custom user model?*

Regards,
  Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d75e460a-1f3a-4338-b936-23a797ee335cn%40googlegroups.com.

Reply via email to