Issue #53 new

Is django queryset caching enabled in djangoappengine?

rahul342
created an issue

I have models like these -- {{{

!python

class Match(models.Model): name = models.CharField(max_length=500) match_date = models.DateField()

class Bet(models.Model): category = models.ForeignKey(BetCategory) match = models.ForeignKey(Match, null=True) }}}

I tried the following on python manage.py remote shell, if I do

{{{

!python

matches = bet_data_models.Match.objects.filter(match_date = some_date) bets = bet_data_models.Bet.objects.filter(match__in = matches) print bets []

}}} I get empty bets..

But if I enclose the matches in list() and try -- {{{

!python

matches = list(bet_data_models.Match.objects.filter(match_date = some_date)) bets = bet_data_models.Bet.objects.filter(match__in = matches) print bets }}} I get list of bets.

Comments (0)

  1. Log in to comment