[Answer]-How to filter objects based on a string containing numbers in django

1👍

If the area is a number it should be an IntegerField. Then Foo.objects.filter(area__range=[5,10]) will work. You can add the units (square feet in this case) in your templates to save your users the job of inputting them every time and you the nightmare of keeping that consistent.

Leave a comment