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

All Samples(15)  |  Call(11)  |  Derive(1)  |  Import(3)

src/d/j/django-oscar-paypal-HEAD/sandbox/apps/checkout/views.py   django-oscar-paypal(Download)
        ctx = super(PaymentDetailsView, self).get_context_data(**kwargs)
        ctx['bankcard_form'] = kwargs.get(
            'bankcard_form', forms.BankcardForm())
        ctx['billing_address_form'] = kwargs.get(
            'billing_address_form', forms.BillingAddressForm())
            return self.do_place_order(request)
 
        bankcard_form = forms.BankcardForm(request.POST)
        billing_address_form = forms.BillingAddressForm(request.POST)
        if not all([bankcard_form.is_valid(),
    def do_place_order(self, request):
        # Helper method to check that the hidden forms wasn't tinkered
        # with.
        bankcard_form = forms.BankcardForm(request.POST)
        billing_address_form = forms.BillingAddressForm(request.POST)

src/d/j/django-oscar-HEAD/sites/demo/apps/checkout/views.py   django-oscar(Download)
 
from oscar.apps.checkout import views, exceptions
from oscar.apps.payment.forms import BankcardForm
from oscar.apps.payment.models import SourceType
from oscar.apps.order.models import BillingAddress
        # already specified).
        if 'bankcard_form' not in kwargs:
            ctx['bankcard_form'] = BankcardForm()
        if 'billing_address_form' not in kwargs:
            ctx['billing_address_form'] = self.get_billing_address_form(
    def handle_payment_details_submission(self, request):
        # Validate the submitted forms
        bankcard_form = BankcardForm(request.POST)
        shipping_address = self.get_shipping_address(
            self.request.basket)
    def handle_place_order_submission(self, request):
        bankcard_form = BankcardForm(request.POST)
        shipping_address = self.get_shipping_address(
            self.request.basket)
        address_form = BillingAddressForm(shipping_address, request.POST)

src/d/j/django-oscar-datacash-HEAD/sandbox/apps/checkout/views.py   django-oscar-datacash(Download)
 
from oscar.apps.checkout.views import PaymentDetailsView as OscarPaymentDetailsView
from oscar.apps.payment.forms import BankcardForm
from oscar.apps.payment.models import SourceType, Source
from oscar.apps.order.models import ShippingAddress
    def get_context_data(self, **kwargs):
        # Add bankcard form to the template context
        ctx = super(PaymentDetailsView, self).get_context_data(**kwargs)
        ctx['bankcard_form'] = kwargs.get('bankcard_form', BankcardForm())
        return ctx
 
    def handle_payment_details_submission(self, request):
        # Check bankcard form is valid
        bankcard_form = BankcardForm(request.POST)
    def handle_place_order_submission(self, request):
        bankcard_form = BankcardForm(request.POST)
        if bankcard_form.is_valid():
            submission = self.build_submission(
                payment_kwargs={

src/d/j/django-oscar-sagepay-0.1.2/sagepay/forms.py   django-oscar-sagepay(Download)
from django import forms
from oscar.apps.payment.forms import BankcardForm
 
class CardHolder(forms.CharField):
 
class SagePayForm(BankcardForm):
    card_holder = CardHolder()
 
 
    class Meta(BankcardForm.Meta):

src/d/j/django-oscar-HEAD/tests/unit/payment/form_tests.py   django-oscar(Download)
            'expiry_month_1': today.year + 1
        }
        self.form = forms.BankcardForm(data)
        self.assertTrue(self.form.is_valid())
 
            'expiry_month_1': today.year + 1,
        }
        form = forms.BankcardForm(data)
        self.assertFalse(form.is_valid())