Did I find the right examples for you? yes no

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

src/d/j/django-lfs-0.7.7/lfs/payment/utils.py   django-lfs(Download)
    """
    result = []
    for pm in PaymentMethod.objects.filter(active=True):
        if criteria_utils.is_valid(request, pm):
            result.append(pm)
def get_default_payment_method(request):
    """
    Returns the default payment method for given request.
    """
    active_payment_methods = PaymentMethod.objects.filter(active=True)

src/d/j/django-lfs-HEAD/lfs/payment/utils.py   django-lfs(Download)
    """
    result = []
    for pm in PaymentMethod.objects.filter(active=True):
        if pm.is_valid(request):
            result.append(pm)
def get_default_payment_method(request):
    """
    Returns the default payment method for given request.
    """
    active_payment_methods = PaymentMethod.objects.filter(active=True)

src/l/f/lfs-HEAD/payment/utils.py   lfs(Download)
    """
    result = []
    for pm in PaymentMethod.objects.filter(active=True):
        if criteria_utils.is_valid(request, pm):
            result.append(pm)
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)

src/d/j/django-lfs-0.7.7/lfs/manage/views/criteria.py   django-lfs(Download)
        "id": "%s%s" % (now.strftime("%s"), now.microsecond),
        "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_payment_methods = self.payment_methods.all()
        payment_methods = []
        for pm in PaymentMethod.objects.filter(active=True):
            if pm in selected_payment_methods:
                selected = True

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

src/l/f/lfs-HEAD/manage/views/criteria.py   lfs(Download)
        "id" : "%s%s" % (now.strftime("%s"), now.microsecond),
        "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_payment_methods = self.payment_methods.all()
        payment_methods = []
        for pm in PaymentMethod.objects.filter(active=True):
            if pm in selected_payment_methods:
                selected = True