python - Django, using ANY in a query -
this question has reply here:
django object multiple exclude() 3 answersbasically have this:
where not (`video_video`.`id` = **any** (select `userpreferences_history`.`video_id` `userpreferences_history`))
but using:
.exclude(id=history_list)
i get:
where not (`video_video`.`id` = (select `userpreferences_history`.`video_id` `userpreferences_history`))
resulting in 'subquery returns more 1 row when have more 1 result subquery.
how can this?
fixed next way: django object multiple exclude()
assuming history_list
proper subquery, .exclude(id__in=history_list)
.
python mysql django django-queryset
No comments:
Post a Comment