hi,
class Status(models.Model):
someid = models.IntegerField()
value = models.IntegerField()
status_msg = models.CharField(max_length = 2000)
so my database look like:
20 1234567890 'some mdg'
20 4597434534 'some msg2'
20 3453945934 'sdfgsdf'
10 4503485344 'ddfgg'
so I have to fetch values contain a giving someid between some values. so let say
val1 = '1234567890'
val2 = '4414544544'
so my final result should be list containing of 2 entry for id = 20 how to implement this.
i tried using
list = Status.objects.filter(someid = 20, value < val2, value > val1)
which is wrong? how to fix this.
thanks.