@register.filter
def packages(cart_item):
    """
    Returns the packages based on product's package unit and cart items
    amount.
    """
    packing_unit, packing_unit_unit = cart_item.product.get_packing_info()
    if packing_unit:
        try:
            amount = float(cart_item.amount)
        except ValueError:
            amount = locale.atof(cart_item.amount)
        return int(math.ceil(packing_unit / amount))
    return 0
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/templatetags/lfs_tags.py/packages/swapped operands of `/`