How to use and
clause in Django
For ex:
select Date(timestamp) from userlog where (Date(timestamp) >= "2008-01-02" and Date(timestamp) <= "2009-01-02") and ipaddress != "192.168.2.211";
Django query:
userlog.objects.filter(timestamp__range=(startdate,enddate),ipaddress !="192.168.2.211")
In the above there is an error saying non-keyword arg afterkeyword arg
and the error is in the above line
ipaddress is a char field,Am i constructing the query wrong if so how this should be resolved