summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTobias Kunze <r@rixx.de>2019-04-27 18:32:27 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-04-30 09:09:16 +0200
commiteb16c7260e573ec513d84cb586d96bdf508f3173 (patch)
tree221e587f102a2cfd622239f2065f0696adead774 /docs
parenta8b3f96f6acfa082f99166e0a1cfb4b0fbc0eace (diff)
Fixed #20629 -- Rephrased custom user models admonition.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/auth/customizing.txt21
1 files changed, 10 insertions, 11 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index 5c01067a75..fd723cbb94 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -511,18 +511,17 @@ different user model.
Specifying a custom user model
------------------------------
-.. admonition:: Model design considerations
+When you start your project with a custom user model, stop to consider if this
+is the right choice for your project.
- Think carefully before handling information not directly related to
- authentication in your custom user model.
-
- It may be better to store app-specific user information in a model
- that has a relation with the user model. That allows each app to specify
- its own user data requirements without risking conflicts with other
- apps. On the other hand, queries to retrieve this related information
- will involve a database join, which may have an effect on performance.
-
-Django expects your custom user model to meet some minimum requirements.
+Keeping all user related information in one model removes the need for
+additional or more complex database queries to retrieve related models. On the
+other hand, it may be more suitable to store app-specific user information in a
+model that has a relation with your custom user model. That allows each app to
+specify its own user data requirements without potentially conflicting or
+breaking assumptions by other apps. It also means that you would keep your user
+model as simple as possible, focused on authentication, and following the
+minimum requirements Django expects custom user models to meet.
If you use the default authentication backend, then your model must have a
single unique field that can be used for identification purposes. This can