One of my fields in my model has a choice field:
STATUS = Choices(
('first', _('car')),
('second', _('motorcycle')),
('third', _('bicycle')),
)
My filter function looks like this:
choice = request.GET.get('choice')
vehicles = vehicles.filter(status=choice).order_by('-date_posted')
The filter works, when I select only one choice, but when I am trying to select more than one choice it only catches the last one selected.
The query looks like that:
?choice=first&choice=second
Any idea how to make it, so it would display items, based on more than one choice?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…