1👍
qs=qs.filter(name__icontains=query)
line performs a pattern matching filtering. If you need exact filtering, then use __exact
postfix instead of __contains
:
qs=qs.filter(name__exact=query)
Source:stackexchange.com
1👍
qs=qs.filter(name__icontains=query)
line performs a pattern matching filtering. If you need exact filtering, then use __exact
postfix instead of __contains
:
qs=qs.filter(name__exact=query)