from django import template

from oscar.core.loading import get_class

DeliveryTime = get_class("checkout.delivery", "DeliveryTime")
register = template.Library()


@register.simple_tag(takes_context=True)
def delivery_time(context, basket):
    return DeliveryTime.delivery_time(basket, context.get("request"))
