Did I find the right examples for you? yes no

All Samples(24)  |  Call(24)  |  Derive(0)  |  Import(0)

src/d/j/django-lfs-0.7.7/lfs/cart/views.py   django-lfs(Download)
        "cart_price": cart_price,
        "cart_tax": cart_tax,
        "shipping_methods": shipping_utils.get_valid_shipping_methods(request),
        "selected_shipping_method": selected_shipping_method,
        "shipping_price": shipping_costs["price"],
    customer.selected_shipping_method_id = request.POST.get("shipping_method")
 
    valid_shipping_methods = shipping_utils.get_valid_shipping_methods(request)
    if customer.selected_shipping_method not in valid_shipping_methods:
        customer.selected_shipping_method = shipping_utils.get_default_shipping_method(request)

src/d/j/django-lfs-HEAD/lfs/cart/views.py   django-lfs(Download)
        "cart_price": cart_price,
        "cart_tax": cart_tax,
        "shipping_methods": shipping_utils.get_valid_shipping_methods(request),
        "selected_shipping_method": selected_shipping_method,
        "shipping_costs": shipping_costs,
    customer.selected_shipping_method = shipping_method
 
    valid_shipping_methods = shipping_utils.get_valid_shipping_methods(request)
    if customer.selected_shipping_method not in valid_shipping_methods:
        customer.selected_shipping_method = shipping_utils.get_default_shipping_method(request)

src/l/f/lfs-HEAD/cart/views.py   lfs(Download)
        "cart_price" : cart_price,
        "cart_tax" : cart_tax,
        "shipping_methods" : shipping_utils.get_valid_shipping_methods(request),
        "selected_shipping_method" : selected_shipping_method,
        "shipping_price" : shipping_costs["price"],
    customer.selected_shipping_method_id = request.POST.get("shipping_method")
 
    valid_shipping_methods = shipping_utils.get_valid_shipping_methods(request)
    if customer.selected_shipping_method not in valid_shipping_methods:
        customer.selected_shipping_method = shipping_utils.get_default_shipping_method(request)

src/d/j/django-lfs-0.7.7/lfs/checkout/views.py   django-lfs(Download)
    """
    selected_shipping_method = lfs.shipping.utils.get_selected_shipping_method(request)
    shipping_methods = lfs.shipping.utils.get_valid_shipping_methods(request)
 
    return render_to_string(template_name, RequestContext(request, {

src/l/f/lfs-HEAD/checkout/views.py   lfs(Download)
    """
    selected_shipping_method = lfs.shipping.utils.get_selected_shipping_method(request)
    shipping_methods = lfs.shipping.utils.get_valid_shipping_methods(request)
 
    return render_to_string(template_name, RequestContext(request, {

src/d/j/django-lfs-HEAD/lfs/checkout/views.py   django-lfs(Download)
    """
    selected_shipping_method = lfs.shipping.utils.get_selected_shipping_method(request)
    shipping_methods = lfs.shipping.utils.get_valid_shipping_methods(request)
 
    return render_to_string(template_name, RequestContext(request, {

src/d/j/django-lfs-0.7.7/lfs/shipping/tests.py   django-lfs(Download)
 
        # And its still valid.
        sms = utils.get_valid_shipping_methods(self.request)
        self.assertEqual(len(sms), 2)
 
 
        # And the shipping method is not valid any more.
        sms = utils.get_valid_shipping_methods(self.request)
        self.assertEqual(len(sms), 1)
 
 
        # Cart price is 0.0 sms1 is not valid
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        # Cart price is greater than 10.0 now - sms1 is valid
        CartItem.objects.create(cart=cart, product=self.p2, amount=1)
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)

src/d/j/django-lfs-HEAD/lfs/shipping/tests.py   django-lfs(Download)
    def test_valid_shipping_methods_1(self):
        """Tests valid shipping methods.
        """
        # And its still valid.
        sms = utils.get_valid_shipping_methods(self.request)
 
        # And the shipping method is not valid any more.
        sms = utils.get_valid_shipping_methods(self.request)
        self.assertEqual(len(sms), 2)
 
 
        # Cart price is 0.0 sms1 is not valid
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        # Cart price is greater than 10.0 now - sms1 is valid
        CartItem.objects.create(cart=cart, product=self.p2, amount=1)
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)

src/l/f/lfs-HEAD/shipping/tests.py   lfs(Download)
 
        # And its still valid. 
        sms = utils.get_valid_shipping_methods(self.request)
        self.assertEqual(len(sms), 2)
 
 
        # And the shipping method is not valid any more.
        sms = utils.get_valid_shipping_methods(self.request)        
        self.assertEqual(len(sms), 1)
 
 
        # Cart price is 0.0 sms1 is not valid    
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        # Cart price is greater than 10.0 now - sms1 is valid
        CartItem.objects.create(cart=cart, product=self.p2, amount=1)
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)