Did I find the right examples for you? yes no

All Samples(19)  |  Call(17)  |  Derive(0)  |  Import(2)

src/d/j/django-lfs-0.7.7/lfs/shipping/utils.py   django-lfs(Download)
def get_first_valid_shipping_method(request, product=None):
    """Returns the valid shipping method with the highest priority.
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods, product)
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods)
 
 
        tax_rate = 0.0
 
    price = criteria_utils.get_first_valid(request,
        shipping_method.prices.all())
 

src/l/f/lfs-HEAD/shipping/utils.py   lfs(Download)
def get_first_valid_shipping_method(request, product=None):
    """Returns the valid shipping method with the highest priority.
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods, product)
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods)
 
def get_selected_shipping_method(request):
        tax_rate = 0.0
 
    price = criteria_utils.get_first_valid(request,
        shipping_method.prices.all())
 

src/d/j/django-lfs-HEAD/lfs/plugins.py   django-lfs(Download)
    def get_tax_rate(self):
        from lfs.criteria.utils import get_first_valid
        from lfs.customer_tax.models import CustomerTax
 
        customer_tax = get_first_valid(self.request, CustomerTax.objects.all(), self.shipping_method)
        """
        from lfs.criteria import utils as criteria_utils
        price = criteria_utils.get_first_valid(self.request,
                                               self.shipping_method.prices.all())
        if price:

src/d/j/django-lfs-HEAD/lfs/shipping/utils.py   django-lfs(Download)
def get_first_valid_shipping_method(request, product=None):
    """Returns the valid shipping method with the highest priority.
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods, product)
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods)
 
 

src/d/j/django-lfs-HEAD/lfs/customer_tax/utils.py   django-lfs(Download)
# lfs imports
from lfs.criteria.utils import get_first_valid
from lfs.customer_tax.models import CustomerTax
 
 
    if request and hasattr(request, cache_key):
        return getattr(request, cache_key)
    customer_tax = get_first_valid(request, CustomerTax.objects.all(), product)
    if customer_tax:
        taxrate = customer_tax.rate

src/d/j/django-lfs-0.7.7/lfs/payment/utils.py   django-lfs(Download)
    """
    active_payment_methods = PaymentMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_payment_methods)
 
 
        tax_rate = 0.0
 
    price = criteria_utils.get_first_valid(request,
        payment_method.prices.all())
 

src/l/f/lfs-HEAD/payment/utils.py   lfs(Download)
def get_default_payment_method(request):
    """Returns the default payment method for given request.
    """
    active_payment_methods = PaymentMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_payment_methods)
        tax_rate = 0.0
 
    price = criteria_utils.get_first_valid(request,
        payment_method.prices.all())
 

src/d/j/django-lfs-HEAD/lfs/payment/utils.py   django-lfs(Download)
    """
    active_payment_methods = PaymentMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_payment_methods)
 
 
        tax_rate = 0.0
 
    price = criteria_utils.get_first_valid(request,
        payment_method.prices.all())
    # TODO: this assumes that payment price is given as gross price, we have to add payment processor here