Django: How to get data connected by ForeignKey via Template?
问题 Since a few weeks I am learning Python and Django. Up to this point it has been enough to read the questions and the answers of other users.But now the moment of my first own question has come. I will try to describe my problem as best i can. My problem is that I cant query or get the data I want. I want to get the url of the first object of class Image which is associated by ForeignKey to a Gallery, which is associated by ForeignKey to the class Entry. Here the models.py so far: class