Did I find the right examples for you? yes no

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

src/d/j/django-lfs-0.7.7/lfs/shipping/utils.py   django-lfs(Download)
def get_valid_shipping_methods(request, product=None):
    """Returns a list of all valid shipping methods for the passed request.
    """
    result = []
    for sm in ShippingMethod.objects.filter(active=True):
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)
    made more explicit in future.
    """
    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/shipping/utils.py   django-lfs(Download)
def get_valid_shipping_methods(request, product=None):
    """Returns a list of all valid shipping methods for the passed request.
    """
    result = []
    for sm in ShippingMethod.objects.filter(active=True):
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)
    made more explicit in future.
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods)
 

src/l/f/lfs-HEAD/shipping/utils.py   lfs(Download)
def get_valid_shipping_methods(request, product=None):
    """Returns a list of all valid shipping methods for the passed request.
    """
    result = []
    for sm in ShippingMethod.objects.filter(active=True):
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)
    made more explicit in future.
    """
    active_shipping_methods = ShippingMethod.objects.filter(active=True)
    return criteria_utils.get_first_valid(request, active_shipping_methods)
 

src/d/j/django-lfs-0.7.7/lfs/manage/views/criteria.py   django-lfs(Download)
        "countries": countries,
        "payment_methods": PaymentMethod.objects.filter(active=True),
        "shipping_methods": ShippingMethod.objects.filter(active=True),
    })))
 

src/d/j/django-lfs-0.7.7/lfs/criteria/models/criteria.py   django-lfs(Download)
        selected_shipping_methods = self.shipping_methods.all()
        shipping_methods = []
        for sm in ShippingMethod.objects.filter(active=True):
            if sm in selected_shipping_methods:
                selected = True

src/d/j/django-lfs-HEAD/lfs/criteria/models.py   django-lfs(Download)
    def get_selectable_values(self, request):
        selected_shipping_methods = self.value.all()
        shipping_methods = []
        for sm in ShippingMethod.objects.filter(active=True):
            if sm in selected_shipping_methods:

src/l/f/lfs-HEAD/manage/views/criteria.py   lfs(Download)
        "countries" : countries,
        "payment_methods" : PaymentMethod.objects.filter(active=True),
        "shipping_methods" : ShippingMethod.objects.filter(active=True),
    })))

src/l/f/lfs-HEAD/criteria/models/criteria.py   lfs(Download)
        selected_shipping_methods = self.shipping_methods.all()
        shipping_methods = []
        for sm in ShippingMethod.objects.filter(active=True):
            if sm in selected_shipping_methods:
                selected = True