Tell me please. The model has such fields
class Tariffs(models.Model): days = IntegerRangeField(verbose_name=u'Дни') rate = models.DecimalField(verbose_name=u'Коэффициент', max_digits=5, decimal_places=2)
The database contains records of days of different ranges (for example (0, 7)) and coefficients (rate). I get two dates from the user, I calculate the number of days between them and I want to check what range of fields this number falls in, then if found, multiply by the corresponding coefficient and then output. How to act? I use Django 1.10.
About QuerySet, filters, etc. read, I just can not understand what the query should look like.
Thanks for any suggestions.