The customer app bundles communication with customers. This includes models to record product alerts and sent emails. It also contains the views that allow a customer to manage their data (profile information, shipping addresses, etc.)

Abstract models

class oscar.apps.customer.abstract_models.AbstractCommunicationEventType(*args, **kwargs)[source]

A ‘type’ of communication. Like a order confirmation email.


Return a dict of templates with the context merged in

We look first at the field templates but fail over to a set of file templates that follow a conventional path.

name = None

Name is the friendly description of an event for use in the admin

class oscar.apps.customer.abstract_models.AbstractEmail(*args, **kwargs)[source]

This is a record of all emails sent to a customer. Normally, we only record order-related emails.

class oscar.apps.customer.abstract_models.AbstractProductAlert(*args, **kwargs)[source]

An alert for when a product comes back in stock


Get a random generated key based on SHA-1 and email address

class oscar.apps.customer.abstract_models.AbstractUser(*args, **kwargs)[source]

An abstract base user suitable for use in Oscar projects.

This is basically a copy of the core AbstractUser model but without a username field and with a unique index on the email field.


class oscar.apps.customer.forms.EmailAuthenticationForm(host, *args, **kwargs)[source]

Extends the standard django AuthenticationForm, to support 75 character usernames. 75 character usernames are needed to support the EmailOrUsername auth backend.

class oscar.apps.customer.forms.PasswordResetForm(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.util.ErrorList'>, label_suffix=None, empty_permitted=False)[source]

This form takes the same structure as its parent from django.contrib.auth

save(domain_override=None, subject_template_name='registration/password_reset_subject.txt', email_template_name='registration/password_reset_email.html', use_https=False, token_generator=<django.contrib.auth.tokens.PasswordResetTokenGenerator object at 0x7f136216d990>, from_email=None, request=None, **kwargs)[source]

Generates a one-use only link for resetting password and sends to the user.


class oscar.apps.customer.views.AccountAuthView(**kwargs)[source]

This is actually a slightly odd double form view


alias of EmailAuthenticationForm

class oscar.apps.customer.views.AccountSummaryView(**kwargs)[source]

View that exists for legacy reasons and customisability. It commonly gets called when the user clicks on “Account” in the navbar, and can be overriden to determine to what sub-page the user is directed without having to change a lot of templates.

class oscar.apps.customer.views.AddressChangeStatusView(**kwargs)[source]

Sets an address as default_for_(billing|shipping)

class oscar.apps.customer.views.AddressListView(**kwargs)[source]

Customer address book


Return customer’s addresses

class oscar.apps.customer.views.EmailDetailView(**kwargs)[source]

Customer email


Return an order object or 404


Append email subject to page title

class oscar.apps.customer.views.OrderHistoryView(**kwargs)[source]

Customer order history


alias of Order

class oscar.apps.customer.views.OrderLineView(**kwargs)[source]

Customer order line


Return an order object or 404