checkout package¶
Subpackages¶
- checkout.management package
- checkout.migrations package
- Submodules
- checkout.migrations.0001_initial module
- checkout.migrations.0002_auto_20150625_1159 module
- checkout.migrations.0003_auto_20150903_0849 module
- checkout.migrations.0004_auto_20150907_1607 module
- checkout.migrations.0005_auto_20151002_2010 module
- checkout.migrations.0006_customerpayment module
- checkout.migrations.0007_objectpaymentplaninstalment_retry_count module
- checkout.migrations.0008_auto_20160519_2033 module
- Module contents
- checkout.templatetags package
- checkout.tests package
- Submodules
- checkout.tests.factories module
- checkout.tests.helper module
- checkout.tests.test_checkout_settings module
- checkout.tests.test_checkout_state module
- checkout.tests.test_customer module
- checkout.tests.test_customer_payment module
- checkout.tests.test_management_command module
- checkout.tests.test_payment_plan module
- checkout.tests.test_tasks module
- checkout.tests.test_view_perm module
- Module contents
Submodules¶
checkout.admin module¶
checkout.forms module¶
-
class
checkout.forms.
CheckoutForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
Checkout form.
If extending this to a form that has contact address fields then set additional_prefix to make the field names unique.
-
additional_prefix
= ''¶
-
base_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
clean
()[source]¶ Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
-
declared_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
checkout.forms.
CustomerCheckoutForm
(*args, **kwargs)[source]¶ Bases:
checkout.forms.CheckoutForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ('action',)¶
-
model
¶ alias of
checkout.models.Customer
-
-
base_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
media
¶
-
class
-
class
checkout.forms.
CustomerEmptyForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ()¶
-
model
¶ alias of
checkout.models.Customer
-
-
base_fields
= {}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
checkout.forms.
CustomerPaymentForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ('description', 'total')¶
-
model
¶ alias of
checkout.models.CustomerPayment
-
-
base_fields
= {'description': <django.forms.fields.CharField object>, 'total': <django.forms.fields.DecimalField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
checkout.forms.
ObjectPaymentPlanEmptyForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ()¶
-
model
¶ alias of
checkout.models.ObjectPaymentPlan
-
-
base_fields
= {}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
checkout.forms.
ObjectPaymentPlanInstalmentCheckoutForm
(*args, **kwargs)[source]¶ Bases:
checkout.forms.CheckoutForm
-
base_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'action': <django.forms.fields.ChoiceField object>, 'token': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
checkout.forms.
ObjectPaymentPlanInstalmentEmptyForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm
-
base_fields
= {}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
checkout.forms.
PaymentPlanEmptyForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ()¶
-
model
¶ alias of
checkout.models.PaymentPlan
-
-
base_fields
= {}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
checkout.forms.
PaymentPlanForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ('slug', 'name', 'deposit', 'count', 'interval')¶
-
model
¶ alias of
checkout.models.PaymentPlan
-
-
base_fields
= {'count': <django.forms.fields.IntegerField object>, 'deposit': <django.forms.fields.IntegerField object>, 'interval': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'slug': <django.forms.fields.SlugField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
checkout.models module¶
-
class
checkout.models.
Checkout
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Checkout.
Create a ‘Checkout’ instance when you want to interact with Stripe e.g. take a payment, get card details to set-up a payment plan or refresh the details of an expired card.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
action
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
action_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
charge
(current_user)[source]¶ Charge the user’s card.
Must be a member of staff or anonymous (used when running as a background task) to use this method.
To take payments for the current user, use the
charge_user
method.
-
charge_user
(current_user)[source]¶ Charge the card of the current user.
Use this method when the logged in user is performing the transaction.
To take money from another user’s card, you must be a member of staff and use the
charge
method.
-
checkout_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
checkoutadditional
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
-
content_object
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_object_url
¶
-
content_type
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
content_type_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
customer
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
customer_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
date_of_birth
¶
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
failed
¶ Did the checkout request fail?
-
get_next_by_checkout_date
(*, field=<django.db.models.fields.DateTimeField: checkout_date>, is_next=True, **kwargs)¶
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_checkout_date
(*, field=<django.db.models.fields.DateTimeField: checkout_date>, is_next=False, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
invoice_data
¶
-
is_invoice
¶
-
is_manual
¶
-
is_payment
¶
-
is_payment_plan
¶ Used in success templates.
-
notify
(request=None)[source]¶ Send notification of checkout status.
Pass in a ‘request’ if you want the email to contain the URL of the checkout transaction.
-
object_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.CheckoutManager object>¶
-
paymentrunitem_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
previous_address_data
¶
-
state
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
state_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
success
()[source]¶ Checkout successful.
This method is called from within a transaction. See
checkout.success
in the model manager.
-
total
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
CheckoutAction
(id, created, modified, name, slug, payment)[source]¶ Bases:
base.model_utils.TimeStampedModel
-
CARD_REFRESH
= 'card_refresh'¶
-
CHARGE
= 'charge'¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
INVOICE
= 'invoice'¶
-
MANUAL
= 'manual'¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PAYMENT
= 'payment'¶
-
PAYMENT_PLAN
= 'payment_plan'¶
-
checkout_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
invoice
¶
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.CheckoutActionManager object>¶
-
payment
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
payment_plan
¶
-
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
checkout.models.
CheckoutActionManager
[source]¶ Bases:
django.db.models.manager.Manager
-
card_refresh
¶
-
charge
¶
-
invoice
¶
-
manual
¶
-
payment
¶
-
payment_plan
¶
-
-
class
checkout.models.
CheckoutAdditional
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
If a user decides to pay by invoice, there are the details.
Links with the ‘CheckoutForm’ in
checkout/forms.py
. Probably easier to put validation in the form if required.-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
address_1
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
address_2
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
address_3
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
checkout
¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
-
checkout_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
company_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
contact_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
country
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
county
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
date_of_birth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
email
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.CheckoutAdditionalManager object>¶
-
phone
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
postcode
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
town
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
CheckoutManager
[source]¶ Bases:
django.db.models.manager.Manager
-
charge
(content_object, current_user, payment_run_item=None)[source]¶ Collect some money from a customer.
You must be a member of staff to use this method. For payment plans, a background process will charge the card. In this case, the user will be anonymous.
We should only attempt to collect money if the customer has already entered their card details.
-
-
class
checkout.models.
CheckoutSettings
(id, default_payment_plan)[source]¶ Bases:
base.singleton.SingletonModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
default_payment_plan
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
default_payment_plan_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.CheckoutSettingsManager object>¶
-
exception
-
class
checkout.models.
CheckoutSettingsManager
[source]¶ Bases:
django.db.models.manager.Manager
-
settings
¶
-
-
class
checkout.models.
CheckoutState
(id, created, modified, name, slug)[source]¶ Bases:
base.model_utils.TimeStampedModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
FAIL
= 'fail'¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PENDING
= 'pending'¶
-
REQUEST
= 'request'¶
-
SUCCESS
= 'success'¶
-
checkout_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_pending
¶
-
is_success
¶
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objectpaymentplaninstalment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <checkout.models.CheckoutStateManager object>¶
-
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
CheckoutStateManager
[source]¶ Bases:
django.db.models.manager.Manager
-
fail
¶
-
pending
¶
-
request
¶ The ‘request’ state is used for payment plans only.
It allows the system to set the state to
request
before charging the account.
-
success
¶
-
-
class
checkout.models.
Customer
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Stripe Customer.
Link the Stripe customer to an email address (and name).
Note: It is expected that multiple users in our databases could have the same email address. If they have different names, then this table looks very confusing. Try checking the ‘content_object’ of the ‘Checkout’ model if you need to diagnose an issue.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
MAIL_TEMPLATE_CARD_EXPIRY
= 'customer_card_expiry'¶
-
MAIL_TEMPLATE_CARD_REFRESH_REQUEST
= 'contact_card_refresh_request'¶
-
MAIL_TEMPLATE_REMINDER
= 'customer_instalment_reminder'¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
checkout_actions
¶
-
checkout_can_charge
¶ We can always take a payment for this object!
-
checkout_description
¶
-
checkout_email
¶
-
checkout_name
¶
-
checkout_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
checkout_total
¶
-
customer_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
customerpayment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
email
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
expiry_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_expiring
¶ Is the card expiring within the next month?
If the
expiry_date
isNone
, then it has not expired.The expiry date is set to the last day of the month e.g. for September 2015, the
expiry_date
will be 30/09/2015.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.CustomerManager object>¶
-
refresh
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
CustomerManager
[source]¶ Bases:
django.db.models.manager.Manager
-
get_customer
(email)[source]¶ Get the Stripe customer from the email address.
Note: email addresses are case-sensitive. For more info, see https://code.djangoproject.com/ticket/17561.
-
init_customer
(content_object, token)[source]¶ Initialise Stripe customer using email, description and token.
- Lookup existing customer record in the database.
- Retrieve customer from Stripe and update description and token.
- If the customer does not exist:
- Create Stripe customer with email, description and token.
- Create a customer record in the database.
Return the customer database record and clear the card
refresh
flag.- Lookup existing customer record in the database.
-
refresh
¶ Customers with expiring cards.
-
-
class
checkout.models.
CustomerPayment
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Take a payment from a customer.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
checkout_actions
¶
-
checkout_can_charge
¶
-
checkout_description
¶
-
checkout_email
¶
-
checkout_name
¶
-
checkout_total
¶
-
customer
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
customer_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
total
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
ObjectPaymentPlan
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Payment plan for an object.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_object
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
content_type_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instalment_count
¶
-
instalments_due
(due_date=None)[source]¶ Check if previous instalments are due.
Note
The
due_date
parameter will exclude instalments due before this date.
-
object_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objectpaymentplaninstalment_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <checkout.models.ObjectPaymentPlanManager object>¶
-
payment_count
¶
-
payment_plan
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
payment_plan_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
payments
¶
-
total
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
ObjectPaymentPlanInstalment
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Payments due for an object.
The deposit record gets created first. It has the
deposit
field set toTrue
.The instalment records are created after the deposit has been collected. Instalment records have the
deposit
field set toFalse
.-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
REMINDER_CHECK
= 21¶
-
REMINDER_DAYS
= 7¶
-
RETRY_COUNT
= 4¶
-
amount
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
can_mark_paid
¶
-
checkout_actions
¶ Payments are normally charged directly.
-
checkout_audit
¶
-
checkout_can_charge
¶ Check we can take the payment.
-
checkout_description
¶
-
checkout_email
¶
-
checkout_fail
(checkout)[source]¶ Update the object to record the payment failure.
Called from within a transaction so you can update the model.
-
checkout_name
¶
-
checkout_success
(checkout)[source]¶ Update the object to record the payment success.
Called from within a transaction and you can update the model.
-
checkout_total
¶
-
count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
current_instalment
¶
-
deposit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
due
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_due
(*, field=<django.db.models.fields.DateField: due>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_due
(*, field=<django.db.models.fields.DateField: due>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
object_payment_plan
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
object_payment_plan_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.ObjectPaymentPlanInstalmentManager object>¶
-
paymentrunitem_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
retry_count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
state
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
state_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
ObjectPaymentPlanInstalmentManager
[source]¶ Bases:
django.db.models.manager.Manager
-
due
¶ Lock the records while we try and take the payment.
TODO Do we need to check that a payment is not already linked to this record?
-
reminder
()[source]¶ List of instalments which will be due soon.
This information will be used to send a reminder email to the customer so they can make sure they have money in their account.
-
-
class
checkout.models.
ObjectPaymentPlanManager
[source]¶ Bases:
django.db.models.manager.Manager
-
create_object_payment_plan
(content_object, payment_plan, total)[source]¶ Create a payment plan for an object with the initial deposit record.
This method must be called from within a transaction.
-
fail_or_request
¶
-
outstanding_payment_plans
¶ List of outstanding payment plans.
Used to refresh card expiry dates.
-
report_card_expiry_dates
¶ Outstanding payment plans showing expiry dates in order.
-
-
class
checkout.models.
PaymentPlan
(*args, **kwargs)[source]¶ Bases:
base.model_utils.TimeStampedModel
Definition of a payment plan.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
can_update
¶
-
checkoutsettings_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
clean
()[source]¶ Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
-
count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deposit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
interval
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objectpaymentplan_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <checkout.models.PaymentPlanManager object>¶
-
save
(*args, **kwargs)[source]¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
PaymentRun
(id, created)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.PaymentRunManager object>¶
-
paymentrunitem_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
checkout.models.
PaymentRunItem
(id, created, modified, payment_run, instalment, checkout)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
checkout
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
checkout_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instalment
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
instalment_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
modified
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <checkout.models.PaymentRunItemManager object>¶
-
payment_run
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
payment_run_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
checkout.models.
PaymentRunManager
[source]¶ Bases:
django.db.models.manager.Manager
-
process_payments
()[source]¶ Process pending payments.
We set the status to ‘request’ before asking for the money. This is because we can’t put the payment request into a transaction. If we are not careful, we could have a situation where the payment succeeds and we don’t manage to set the state to ‘success’. In the code below, if the payment fails the record will be left in the ‘request’ state and so we won’t ask for the money again.
-
checkout.service module¶
checkout.tasks module¶
checkout.urls module¶
checkout.views module¶
-
class
checkout.views.
CheckoutAuditListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 10¶
-
-
class
checkout.views.
CheckoutBaseMixin
[source]¶ Bases:
object
Some methods for use in creating a checkout
-
class
checkout.views.
CheckoutCardRefreshListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
Customers with expiring cards.
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 10¶
-
template_name
= 'checkout/card_refresh_list.html'¶
-
-
class
checkout.views.
CheckoutDashTemplateView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.base.TemplateView
-
template_name
= 'checkout/dash.html'¶
-
-
class
checkout.views.
CheckoutListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 10¶
-
-
class
checkout.views.
CheckoutMixin
[source]¶ Bases:
checkout.views.CheckoutBaseMixin
Checkout using a standalone view.
Use with an
UpdateView
e.g:class ShopCheckoutUpdateView(CheckoutMixin, BaseMixin, UpdateView):
-
class
checkout.views.
CheckoutSuccessMixin
[source]¶ Bases:
object
Thank you for your payment (etc).
Use with a
DetailView
e.g:class ShopCheckoutSuccessView( CheckoutSuccessMixin, BaseMixin, DetailView):
-
model
¶ alias of
checkout.models.Checkout
-
-
class
checkout.views.
CustomerCardRefreshFormView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
Send an email to a user asking them to refresh their card details.
The email will contain a link to the page on the site where the user can enter their card details.
The URL is hard-coded to be
web.contact.card.refresh
.-
form_class
¶ alias of
checkout.forms.CustomerEmptyForm
-
model
¶ alias of
checkout.models.Customer
-
template_name
= 'checkout/customer_card_refresh_form.html'¶
-
-
class
checkout.views.
CustomerChargeCreateView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.CreateView
-
form_class
¶ alias of
checkout.forms.CustomerPaymentForm
-
model
¶ alias of
checkout.models.CustomerPayment
-
-
class
checkout.views.
CustomerCheckoutRefreshUpdateView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,checkout.views.CheckoutMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
-
form_class
¶ alias of
checkout.forms.CustomerCheckoutForm
-
model
¶ alias of
checkout.models.Customer
-
template_name
= 'checkout/customer_checkout_refresh.html'¶
-
-
class
checkout.views.
CustomerTemplateView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.base.TemplateView
-
template_name
= 'checkout/customer.html'¶
-
-
class
checkout.views.
ObjectPaymentPlanCardFailListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 10¶
-
-
class
checkout.views.
ObjectPaymentPlanDeleteView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
-
form_class
¶
-
model
¶ alias of
checkout.models.ObjectPaymentPlan
-
template_name
= 'checkout/object_paymentplan_delete.html'¶
-
-
class
checkout.views.
ObjectPaymentPlanDetailView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.detail.DetailView
-
model
¶ alias of
checkout.models.ObjectPaymentPlan
-
-
class
checkout.views.
ObjectPaymentPlanInstalmentAuditListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 15¶
-
-
class
checkout.views.
ObjectPaymentPlanInstalmentChargeUpdateView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
Charge the customers card for this instalment.
-
form_class
¶ alias of
checkout.forms.ObjectPaymentPlanInstalmentEmptyForm
-
model
¶
-
template_name
= 'checkout/objectpaymentplaninstalment_charge_form.html'¶
-
-
class
checkout.views.
ObjectPaymentPlanInstalmentDetailView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.detail.DetailView
-
model
¶
-
-
class
checkout.views.
ObjectPaymentPlanInstalmentPaidUpdateView
(**kwargs)[source]¶ Bases:
braces.views._access.StaffuserRequiredMixin
,braces.views._access.LoginRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
Mark this instalment as paid.
-
form_class
¶ alias of
checkout.forms.ObjectPaymentPlanInstalmentEmptyForm
-
model
¶
-
template_name
= 'checkout/objectpaymentplaninstalment_paid_form.html'¶
-
-
class
checkout.views.
ObjectPaymentPlanListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model
¶ alias of
checkout.models.ObjectPaymentPlan
-
paginate_by
= 10¶
-
-
class
checkout.views.
PaymentPlanCreateView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.CreateView
-
form_class
¶ alias of
checkout.forms.PaymentPlanForm
-
model
¶ alias of
checkout.models.PaymentPlan
-
-
class
checkout.views.
PaymentPlanDeleteView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
-
form_class
¶ alias of
checkout.forms.PaymentPlanEmptyForm
-
model
¶ alias of
checkout.models.PaymentPlan
-
template_name
= 'checkout/paymentplan_delete.html'¶
-
-
class
checkout.views.
PaymentPlanListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 5¶
-
-
class
checkout.views.
PaymentPlanUpdateView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.edit.UpdateView
-
form_class
¶ alias of
checkout.forms.PaymentPlanForm
-
model
¶ alias of
checkout.models.PaymentPlan
-
-
class
checkout.views.
PaymentRunItemListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 20¶
-
-
class
checkout.views.
PaymentRunListView
(**kwargs)[source]¶ Bases:
braces.views._access.LoginRequiredMixin
,braces.views._access.StaffuserRequiredMixin
,base.view_utils.BaseMixin
,django.views.generic.list.ListView
-
get_queryset
()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
paginate_by
= 20¶
-