Did I find the right examples for you? yes no

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

src/d/j/django-lfs-HEAD/lfs/cart/utils.py   django-lfs(Download)
            if cart is None:
                try:
                    cart = Cart.objects.get(user=user)
                except Cart.MultipleObjectsReturned:
                    carts = Cart.objects.filter(user=user)
            if cart is None:
                try:
                    cart = Cart.objects.get(session=session_key)
                except Cart.MultipleObjectsReturned:
                    carts = Cart.objects.filter(session=session_key)
    """
    try:
        session_cart = Cart.objects.get(session=request.session.session_key)
        try:
            user_cart = Cart.objects.get(user=request.user)

src/d/j/django-lfs-0.7.7/lfs/cart/utils.py   django-lfs(Download)
            cart = cache.get(cache_key)
            if cart is None:
                cart = Cart.objects.get(user=user)
                cache.set(cache_key, cart)
            return cart
            cart = cache.get(cache_key)
            if cart is None:
                cart = Cart.objects.get(session=session_key)
                cache.set(cache_key, cart)
            return cart
    """
    try:
        session_cart = Cart.objects.get(session=request.session.session_key)
        try:
            user_cart = Cart.objects.get(user=request.user)

src/l/f/lfs-HEAD/cart/utils.py   lfs(Download)
            cart = cache.get("cart-%s" % user)
            if cart is None:
                cart = Cart.objects.get(user = user)
                cache.set("cart-%s" % user, cart)
            return cart
            cart = cache.get("cart-%s" % session_key)
            if cart is None:
                cart = Cart.objects.get(session = session_key)
                cache.set("cart-%s" % session_key, cart)
            return cart
    """
    try:
        session_cart = Cart.objects.get(session = request.session.session_key)
        try:
            user_cart = Cart.objects.get(user = request.user)

src/d/j/django-lfs-0.7.7/lfs/manage/views/customer.py   django-lfs(Download)
    for customer in page.object_list:
        try:
            cart = Cart.objects.get(session=customer.session)
            cart_price = cart.get_price_gross(request, total=True)
        except Cart.DoesNotExist:
 
    try:
        cart = Cart.objects.get(session=customer.session)
        cart_price = cart.get_price_gross(request)
    except Cart.DoesNotExist:
    for customer in page.object_list:
        try:
            cart = Cart.objects.get(session=customer.session)
            cart_price = cart.get_price_gross(request, total=True)
        except Cart.DoesNotExist:

src/l/f/lfs-HEAD/manage/views/customer.py   lfs(Download)
 
    try:
        cart = Cart.objects.get(session=customer.session)
        cart_price = lfs.cart.utils.get_cart_price(request, cart, total=True)
    except Cart.DoesNotExist:
    for customer in page.object_list:
        try:
            cart = Cart.objects.get(session=customer.session)
            cart_price = lfs.cart.utils.get_cart_price(request, cart, total=True)
        except Cart.DoesNotExist:

src/d/j/django-lfs-HEAD/lfs/manage/views/customer.py   django-lfs(Download)
 
        try:
            cart = Cart.objects.get(query)
            cart_price = cart.get_price_gross(request, total=True)
        except Cart.DoesNotExist:
 
    try:
        cart = Cart.objects.get(query)
    except Cart.DoesNotExist:
        cart = None
 
        try:
            cart = Cart.objects.get(query)
            cart_price = cart.get_price_gross(request, total=True)
        except Cart.DoesNotExist: