【发布时间】:2014-12-11 10:47:36
【问题描述】:
在网址中:
https://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api
我无法理解这一行:
# Display any choices from the related object set -- none so far.
>>> q.choice_set.all()
q 是 Question 的一个实例,我们没有在哪里定义属性choice_set,那么它是怎么工作的呢?
【问题讨论】:
-
这可能会有所帮助 - stackoverflow.com/questions/2048777/…
标签: python django django-models