Did I find the right examples for you? yes no

All Samples(18)  |  Call(9)  |  Derive(0)  |  Import(9)

src/d/j/django-lfs-HEAD/lfs/payment/utils.py   django-lfs(Download)
    """
    from lfs.core.utils import import_symbol
    from lfs.order.utils import add_order
    from lfs.cart.utils import get_cart
    payment_method = get_selected_payment_method(request)
        create_order_time = payment_instance.get_create_order_time()
        if create_order_time == PM_ORDER_IMMEDIATELY:
            order = add_order(request)
            if order is None:
                return {'accepted': True, 'next_url': reverse("lfs_shop_view")}
        if result["accepted"]:
            if create_order_time == PM_ORDER_ACCEPTED:
                order = add_order(request)
                if result.get("order_state"):
                    order.state = result.get("order_state")
                    order.save()
                order_submitted.send({"order": order, "request": request})
        return result
    else:
        order = add_order(request)

src/l/f/lfs-HEAD/checkout/views.py   lfs(Download)
            # cart.
            if result.get("success") == True:
                order = lfs.order.utils.add_order(request)
 
                # TODO: Get rid of these payment specific payment stuff. This

src/l/f/lfs-HEAD/order/tests.py   lfs(Download)
from lfs.customer.models import Address
from lfs.customer.models import Customer
from lfs.order.utils import add_order
from lfs.order.settings import SUBMITTED
from lfs.payment.models import PaymentMethod
    def test_add_order(self):
        """Tests the general adding of an order via the add_order method
        """
        order = add_order(self.request)
 

src/d/j/django-lfs-HEAD/lfs/order/tests.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.models import OrderItem
from lfs.order.utils import add_order
from lfs.order.settings import SUBMITTED
from lfs.payment.models import PaymentMethod
        self.assertEqual(4, Address.objects.count())
 
        order = add_order(self.request)
 
        # adding an order should deep copy our addresses above

src/d/j/django-lfs-HEAD/lfs/discounts/tests.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.models import OrderItem
from lfs.order.utils import add_order
from lfs.criteria.models import WeightCriterion
from lfs.criteria.settings import GREATER_THAN, LESS_THAN
    def test_order_discount_price(self):
        """Tests the price of the discount within an order.
        """
        order = add_order(self.request)
 

src/d/j/django-lfs-HEAD/lfs/checkout/tests/test_checkout.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.settings import SUBMITTED
from lfs.order.utils import add_order
from lfs.payment.models import PaymentMethod
from lfs.payment.settings import BY_INVOICE

src/d/j/django-lfs-0.7.7/lfs/order/tests.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.models import OrderItem
from lfs.order.utils import add_order
from lfs.order.settings import SUBMITTED
from lfs.payment.models import PaymentMethod
    def test_add_order(self):
        """Tests the general adding of an order via the add_order method
        """
        order = add_order(self.request)
 

src/d/j/django-lfs-0.7.7/lfs/discounts/tests.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.models import OrderItem
from lfs.order.utils import add_order
from lfs.criteria.models import WeightCriterion
from lfs.criteria.models import CriteriaObjects
    def test_order_discount_price(self):
        """Tests the price of the discount within an order.
        """
        order = add_order(self.request)
 

src/d/j/django-lfs-0.7.7/lfs/checkout/tests/test_checkout.py   django-lfs(Download)
from lfs.order.models import Order
from lfs.order.settings import SUBMITTED
from lfs.order.utils import add_order
from lfs.payment.models import PaymentMethod
from lfs.payment.settings import BY_INVOICE

src/d/j/django-lfs-0.7.7/lfs/checkout/tests/test_addresses.py   django-lfs(Download)
from lfs.core.utils import get_default_shop
from lfs.customer.models import Customer, Address
from lfs.order.utils import add_order
from lfs.order.settings import SUBMITTED
from lfs.payment.models import PaymentMethod