I have my payment model I what to be able to select by date
class LeasePayment(CommonInfo):
version = IntegerVersionField( )
amount = models.DecimalField(max_digits=7, decimal_places=2)
lease = models.ForeignKey(Lease)
leaseterm = models.ForeignKey(LeaseTerm)
payment_date = models.DateTimeField()
method = models.CharField(max_length=2, default='Ch',
choices=PAYMENT_METHOD_CHOICES)
Basically I want to be able to input 2 dates and display all the data between them . Righ now I started to implement this solution https://groups.google.com/forum/#!topic/django-filter/lbi_B4zYq4M based on django_filter. However since the task is pretty trivial was wondering if there an easier way.
Try to use date__range it will return data from database in selected date interval: