I have two very simple classes Submission and Store
class Submission(models.Model):
title = models.CharField(max_length=50, null=True, blank=True)
description = models.CharField(max_length=200, null= True, blank=True)
store = models.ForeignKey(Store)
class Store(models.Model):
store_name = models.CharField(max_length=200)
store_url = models.CharField(max_length=200)
I'd like to look up all the Submissions for a particular Store, filtering by store_name.
In regular Django I can do something like
Submission.objects.filter(store__store_name__exact=_myStoreName_)
However this appears to be invalid database query in Django with Google Appengine (using the djangoappengine package).
What can I do instead?
Thank you.
inner_query = Store.objects.filter(store_name='storename')
submissions = Submission.objects.filter(store__in=inner_query)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With