I want to filter mytable & get rows where name does not contain '' or '-' values and for this purpose I have used below query but does not working.
mytable.objects.exclude(name = ['','-']).order_by('name').count() returning 2000 all rows and whereas query mytable.objects.exclude(name = '').order_by('name').count() working perfectly and returning filtered 1460 results.
Below one is my Postgresql query which is working perfectly fine and returning 1450 results excluding name values of ['','-'].
select * from mytable where name != '-' and name != '' order by -id