Select Children of an Object With ForeignKey in Django?

前端 未结 1 1401
长发绾君心
长发绾君心 2021-01-01 21:17

I\'m brand new to Django, so the answer to this is probably very simple. However, I can\'t figure it out.

Say I have two bare-bones Models.

         


        
相关标签:
1条回答
  • 2021-01-01 21:53

    to follow foreign keys 'backwards' you use

    blog.comment_set.all()
    
    0 讨论(0)
提交回复
热议问题