Hey, I have models like this:
class Galleries(models.Model):
creation_date = models.DateTimeField()
name = models.CharField(max_length=255, unique=True)
gallery_type = models.ForeignKey(Categories)
class Categories(models.Model):
handle = models.CharField(max_length=255, unique=True)
class Values(models.Model):
category = models.ForeignKey(Categories)
language = models.CharField(max_length=7)
category_name = models.CharField(max_length=50)
And now I just want to achieve category values, starting with the Gallery. For example: galleries = Galleries.objects.get(id=1)
. And now I want to somehow achieve the values using this "gallery" object ... To get the values with a specific language, it would be much better ... I miss the skills in Django ORM, so if you can, please point me some docs or give sample code. Thank!
source
share