django - Get the set of objects from Many To One relationship
问题 Please have a look at these models: class Album(models.Model): user = models.ForeignKey(User) name = models.CharField(max_length=200) pub_date = models.DateTimeField(default=datetime.now) class Photo(models.Model): album = models.ForeignKey(Album, default=3) image = models.ImageField(upload_to=get_upload_file_name) caption = models.CharField(max_length=200) pub_date = models.DateTimeField(default=datetime.now) How do I get the the set of photos for a particular album??? And how to get the