次のクエリを実行するとします。
showtimes = ShowTime.objects.filter(
start_date__lte=start,
end_date__gte=end,
movie__slug=movie.slug,
city=city,
visible=1)
queryset object
次に、それを取り込んで、次のような他の属性に基づいて結果をさらにフィルタリングする関数が必要です。
def is_subtitled_3d(showtimes):
return (
showtimes.language == LANGUAGE_SUBTITLED and
showtimes.type_vip == None and
showtimes.type_3d == 1 and
showtimes.type_gtmax == None and
showtimes.type_xd == None)
そのようなものはオブジェクトを変更するために機能しますか、それともそれを行う別の方法がありますか?