You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
xmrauctions/items/templatetags/determine_platform_fee.py

11 lines
278 B
Python

from django import template
from django.conf import settings
register = template.Library()
@register.filter(is_safe=True)
def determine_platform_fee(value):
platform_fee_xmr = float(value * (settings.PLATFORM_FEE_PERCENT / 100) / 2)
return round(platform_fee_xmr, 4)