A
A
Alexander2018-10-02 21:37:55
Django
Alexander, 2018-10-02 21:37:55

How to get a series of data with certain values?

There is a filter, sorting by price, the minimum and maximum are set, I get these parameters in the view and I need to sort the elements with the minimum price equal to the received value and the maximum, respectively

price_min = request.GET.get('min')
price_max = request.GET.get('max')
products_images = ProductImage.objects.filter(is_active=True, is_main=True, product__is_active=True)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-10-02
@AleksandrB

(prixe_int__gte=min,price_int__lte=max)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question