def get_price_filters(category, product_filter, price_filter, manufacturer_filter):
    # If a price filter is set we return just this.
    if price_filter:
        return {
            "show_reset": True,
            "min": locale.format("%.2f", price_filter["min"]),
            "max": locale.format("%.2f", price_filter["max"]),
            "disabled": False,
        }

    # Base are the filtered products
    products = get_filtered_products_for_category(category, product_filter, price_filter, None, manufacturer_filter)
    if not products:
        return []

    all_products = lfs.catalog.models.Product.objects.filter(Q(pk__in=products) | (Q(parent__in=products) & Q(active=True)))
    res = all_products.aggregate(min_price=Min('effective_price'), max_price=Max('effective_price'))

    pmin, pmax = res['min_price'], res['max_price']

    disabled = (pmin and pmax) is None

    try:
        pmin = locale.format("%.2f", pmin)
    except TypeError:
        pmin = 0.0
    try:
        pmax = locale.format("%.2f", pmax)
    except TypeError:
        pmax = 0.0

    return {
        "show_reset": False,
        "min": pmin,
        "max": pmax,
        "disabled": disabled,
    }
Creates price filter based on the min and max prices of the category's
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/utils.py/get_price_filters