D
D
DmSS19972021-10-05 22:02:04
Django
DmSS1997, 2021-10-05 22:02:04

Are there fields in django to store ranges? If so, which ones?

I'm using django-filter with rangefilter. But I also need to specify the range in the model and I don't know how to implement it. I believe it is possible to use two fields in the model: the maximum and minimum value. But then, you need to somehow take this into account for the RangeFilter. Maybe someone knows how you can write your own method for RangeFilter? I would be very grateful for the help, because the question is very interesting and I could not find the answer to it anywhere. I saw an option for PostegreSql with fields built into the database, but I use MySQL

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-10-05
@DmSS1997

https://docs.djangoproject.com/en/3.2/ref/contrib/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question