Now I have this code:
attitude = request.REQUEST['attitude']
if attitude == 'want':
qs = qs.filter(attitudes__want=True)
elif attitude == 'like':
qs = qs.filter(attitudes__like=True)
elif attitude == 'hate':
qs = qs.filter(attitudes__hate=True)
elif attitude == 'seen':
qs = qs.filter(attitudes__seen=True)
It's will be better to define name of "attitudes__xxxx" dynamically. Is there any ways to do that ?
Thanks!