How does use_for_related_fields work in Django?

前端 未结 2 522
一整个雨季
一整个雨季 2021-02-02 12:47

I\'m unable to grasp that from the docs. It\'s totally unclear to me, more specifically:

  • Is it a global setting? So if I specify this attribute it on one of the mo
2条回答
  •  旧巷少年郎
    2021-02-02 13:27

    The short answer is: until this bug is fixed, 'use-for-related-fields' doesn't work in django, except for one-to-one relationships, so don't bother if your use case is m2m or m2one, or you'll be disappointed.

提交回复
热议问题