from django import template
register = template.Library()


@register.filter
def recipe_case(number):
    floor, remainder = divmod(number, 10)
    if remainder == 1 and floor != 1:
        word = 'рецепт'
    elif 1 < remainder <= 4 and floor != 1:
        word = 'рецепта'
    else:
        word = 'рецептов'
    return f'{number} {word}'

255bb7e9054099e822e0fa33b9b9250b049e25c9
<mask token>

<mask token>


@register.filter
def recipe_case(number):
    floor, remainder = divmod(number, 10)
    if remainder == 1 and floor != 1:
        word = 'рецепт'
    elif 1 < remainder <= 4 and floor != 1:
        word = 'рецепта'
    else:
        word = 'рецептов'
    return f'{number} {word}'

<mask token>
register = template.Library()


@register.filter
def recipe_case(number):
    floor, remainder = divmod(number, 10)
    if remainder == 1 and floor != 1:
        word = 'рецепт'
    elif 1 < remainder <= 4 and floor != 1:
        word = 'рецепта'
    else:
        word = 'рецептов'
    return f'{number} {word}'

from django import template
register = template.Library()


@register.filter
def recipe_case(number):
    floor, remainder = divmod(number, 10)
    if remainder == 1 and floor != 1:
        word = 'рецепт'
    elif 1 < remainder <= 4 and floor != 1:
        word = 'рецепта'
    else:
        word = 'рецептов'
    return f'{number} {word}'
