summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorAnubhav Joshi <anubhav9042@gmail.com>2014-07-04 00:00:17 +0530
committerTim Graham <timograham@gmail.com>2014-07-08 08:21:41 -0400
commit75ff7b8fb8335e181ad05e1d4244b4295cc7a105 (patch)
tree1a96dbf9d4670d9d2c35f9a78cfe2c804cceb7ad /docs/topics
parent136a3ffe21988d49e443867d129cc01fb62b34cd (diff)
Fixed #21832 -- Updated prompt, tests, and docs to show that USERNAME_FIELD supports FK after 9bc2d76.
Also added get_input_data() hook in createsuperuser. Thanks Chris Jerdonek and Tim Graham for review.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth/customizing.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index 0b0582775a..be065e4757 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -508,6 +508,15 @@ password resets. You must then provide some key implementation details:
...
USERNAME_FIELD = 'identifier'
+ .. versionadded:: 1.8
+
+ :attr:`USERNAME_FIELD` now supports
+ :class:`~django.db.models.ForeignKey`\s. Since there is no way to pass
+ model instances during the :djadmin:`createsuperuser` prompt, expect the
+ user to enter the value of :attr:`~django.db.models.ForeignKey.to_field`
+ value (the :attr:`~django.db.models.Field.primary_key` by default) of an
+ existing instance.
+
.. attribute:: REQUIRED_FIELDS
A list of the field names that will be prompted for when creating a