mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Fixed #35347 -- Clarified choice_set attribute in tutorial 2.
This commit is contained in:
parent
4636baec17
commit
e279c724c1
@ -515,8 +515,8 @@ Save these changes and start a new Python interactive shell by running
|
|||||||
# Give the Question a couple of Choices. The create call constructs a new
|
# Give the Question a couple of Choices. The create call constructs a new
|
||||||
# Choice object, does the INSERT statement, adds the choice to the set
|
# Choice object, does the INSERT statement, adds the choice to the set
|
||||||
# of available choices and returns the new Choice object. Django creates
|
# of available choices and returns the new Choice object. Django creates
|
||||||
# a set to hold the "other side" of a ForeignKey relation
|
# a set (defined as "choice_set") to hold the "other side" of a ForeignKey
|
||||||
# (e.g. a question's choice) which can be accessed via the API.
|
# relation (e.g. a question's choice) which can be accessed via the API.
|
||||||
>>> q = Question.objects.get(pk=1)
|
>>> q = Question.objects.get(pk=1)
|
||||||
|
|
||||||
# Display any choices from the related object set -- none so far.
|
# Display any choices from the related object set -- none so far.
|
||||||
|
Loading…
Reference in New Issue
Block a user