D
D
Daria2019-11-30 19:17:46
Django
Daria, 2019-11-30 19:17:46

How to implement django filter with manually specified spacing?

I solve the problem with the library https://django-filter.readthedocs.io/en/master/ind...
1. How to exclude the display of fields in the form?
exclude - doesn't help

class TableFilter(django_filters.FilterSet):
    class Meta:
        model = GPSData
        exclude = ['time']
        fields = {
            'height': ['lt', 'gt'],
            'speed': ['lt', 'gt'],
        }

2. Is it possible to somehow make a filter on the interval?
5de295aa2ee7a826374927.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question