Did I find the right examples for you? yes no

All Samples(54)  |  Call(41)  |  Derive(0)  |  Import(13)

src/d/j/django-lfs-HEAD/lfs/catalog/views.py   django-lfs(Download)
import lfs.core.utils
from lfs.caching.utils import lfs_get_object_or_404, get_cache_group_id
from lfs.cart.views import add_to_cart
from lfs.catalog.models import Category, Property
from lfs.catalog.models import File
    """
    if request.REQUEST.get("add-to-cart") is not None:
        return add_to_cart(request)
    else:
        product_id = request.POST.get("product_id")

src/d/j/django-lfs-0.7.7/lfs/catalog/views.py   django-lfs(Download)
import lfs.core.utils
from lfs.caching.utils import lfs_get_object_or_404
from lfs.cart.views import add_to_cart
from lfs.catalog.models import Category, Property
from lfs.catalog.models import File
    """
    if request.REQUEST.get("add-to-cart") is not None:
        return add_to_cart(request)
    else:
        product_id = request.POST.get("product_id")

src/l/f/lfs-HEAD/catalog/views.py   lfs(Download)
import lfs.core.utils
from lfs.caching.utils import lfs_get_object_or_404
from lfs.cart.views import add_to_cart
from lfs.catalog.models import Category
from lfs.catalog.models import Product
    """
    if request.REQUEST.get("add-to-cart") is not None:
        return add_to_cart(request)
    else:
        product_id = request.POST.get("product_id")

src/d/j/django-lfs-HEAD/lfs/cart/tests.py   django-lfs(Download)
from lfs.cart.utils import get_cart
from lfs.cart.utils import update_cart_after_login
from lfs.cart.views import add_to_cart
from lfs.cart.views import added_to_cart_items
from lfs.cart.views import refresh_cart
        self.assertEqual(cart, None)
 
        add_to_cart(request)
 
        cart = get_cart(request)
        self.assertEqual(cart, None)
 
        add_to_cart(request)
 
        cart = get_cart(request)
        self.assertEqual(cart, None)
 
        add_to_cart(request)
 
        cart = get_cart(request)
        request.session = session
        request.user = AnonymousUser()
        add_to_cart(request)
 
        cart = get_cart(request)

src/d/j/django-lfs-0.7.7/lfs/cart/tests.py   django-lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart.views import added_to_cart_items
from lfs.cart.views import refresh_cart
        self.p1.save()
 
        result = add_to_cart(request)
        self.failIf("message" in result.cookies)
 
        self.p1.save()
 
        result = add_to_cart(request)
        self.failIf("message" in result.cookies)
 
 
        # This need to result in a message to the customer
        result = add_to_cart(request)
        self.failIf(result.cookies.get("message").__str__().find("Sorry%2C%20but%20%27Product%201%27%20is%20only%20one%20time%20available.") == -1)
 
        # But no message if product is ordered ...
        self.p1.order_time = self.dt
        self.p1.save()
 
        result = add_to_cart(request)

src/l/f/lfs-HEAD/order/tests.py   lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart import utils as cart_utils
from lfs.core.models import Country

src/d/j/django-lfs-HEAD/lfs/order/tests.py   django-lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart import utils as cart_utils
from lfs.core.models import Country

src/d/j/django-lfs-HEAD/lfs/discounts/tests.py   django-lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart import utils as cart_utils
from lfs.catalog.models import Product

src/d/j/django-lfs-HEAD/lfs/checkout/tests/test_checkout.py   django-lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart import utils as cart_utils
from lfs.core.models import Shop, Country

src/d/j/django-lfs-0.7.7/lfs/order/tests.py   django-lfs(Download)
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.cart.views import add_to_cart
from lfs.cart import utils as cart_utils
from lfs.core.models import Country

  1 | 2  Next