<commit_before>from decimal import Decimal
from django import template

from satchless.product.models import Category

register = template.Library()

@register.filter
def get_categories(slugs):
    slugs = slugs.split(',')
    return dict((c.slug, c) for c in Category.objects.filter(slug__in=slugs))

def price_quantize(price):
    return price.quantize(Decimal('0.01'))<commit_msg>Demo shop: use builtin floatformat filter<commit_after>from django import template

from satchless.product.models import Category

register = template.Library()

@register.filter
def get_categories(slugs):
    slugs = slugs.split(',')
    return dict((c.slug, c) for c in Category.objects.filter(slug__in=slugs))

{'fraction_non_alphanumeric': 0.10919540229885058, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 5.5754716981132075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1453460', 'n_tokens_mistral': 215, 'n_tokens_neox': 216, 'n_words': 56}