Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/d/j/django-oscar-sagepay-0.1.2/sagepay/views.py   django-oscar-sagepay(Download)
from oscar.apps.payment.models import SourceType, Source
from oscar.apps.payment.forms import BillingAddressForm
from oscar.apps.order.models import ShippingAddress
from oscar.apps.address.models import UserAddress
 
    def get_shipping_address(self):
        addr_data = self.checkout_session.new_shipping_address_fields()
        if addr_data:
            return ShippingAddress(**addr_data)
 
        addr_id = self.checkout_session.user_address_id()
        if addr_id:
            # Create shipping address from an existing user address
            user_addr = UserAddress.objects.get(id=addr_id)
            shipping_addr = ShippingAddress()

src/d/j/django-oscar-datacash-HEAD/sandbox/apps/checkout/views.py   django-oscar-datacash(Download)
from oscar.apps.payment.forms import BankcardForm
from oscar.apps.payment.models import SourceType, Source
from oscar.apps.order.models import ShippingAddress
from oscar.apps.address.models import UserAddress
 

src/d/j/django-oscar-HEAD/tests/unit/address/model_tests.py   django-oscar(Download)
from nose.tools import raises
 
from oscar.apps.order.models import ShippingAddress
from oscar.core.compat import get_user_model
from oscar.apps.address import models
    def test_populate_shipping_address_doesnt_set_id(self):
        a = factories.UserAddressFactory.build(country=self.country,
            user=self.user)
        a.clean()
        sa = ShippingAddress()
    def test_populated_shipping_address_has_same_summary_user_address(self):
        a = factories.UserAddressFactory.build(country=self.country,
            user=self.user)
        a.clean()
        sa = ShippingAddress()

src/d/j/django-oscar-HEAD/tests/integration/order/model_tests.py   django-oscar(Download)
 
from oscar.apps.address.models import Country
from oscar.apps.order.models import ShippingAddress, Order, Line, \
        ShippingEvent, ShippingEventType, ShippingEventQuantity, OrderNote, \
        OrderDiscount