During many payment flows, the user is able to cancel the process.
This should often be treated differently from a payment error,
e.g. it might not be appropriate to offer to retry the payment.
This exception adds gives us a good way to address that case.
Closes #1528.
Update documentation to include all shipping methods, fix typo on configure shipping page
Add docstrings to the following classes in 'oscar.apps.shipping.methods':
* Free
* FixedPrice
* TaxExclusiveOfferDiscount
* TaxInclusiveOfferDiscount
Fix typo in 'docs/source/howto/how_to_configure_shipping.rst':
* Change 'shipping.addr' to 'shipping_addr'
The howto recipe on shipping has been rewritten to describe the new
changes to shipping functionality. The old shipping app reference has
been merged in too to avoid duplication.
Extend docs on application instances and customising them
Understanding the application tree these days is only necessary when
wanting to change URLs or views. Hence, it's been moved from the
customising doc and reworked into the how-to. This reduced some
considerable duplication and hopefully makes the customisation section
clearer.
Docs: Remove how-tos on customising mixins and overriding core class
These days, to override a mixin it is only required to override the
OrderPlacementMixin; overriding the app and view is not necessary. It is
just a generic case of overriding a core class. A dedicated how-to is
thus unnecessary.
As overriding a core class is the general goal of any advanced
customisation, it has been merged into the customisation section, which
has been given an overhaul as well.
The section regarding modifying apps will be re-added as part of a
higher-level "the Oscar application tree" kind of document.
Remove useless entropy-increasing calls of django.conf.urls.patterns
The function essentially does two things:
1. it applies a prefix - the first argument - to the given urls. In no
instance a prefix was given
2. it calls url() for simple tuple or list elements in the given iterable.
Cases where such a tuple or list was passed to patterns have been
replaced by direct calls to url()
2 allowed for both calls to url() and simple tuples to be listed in
get_urls() and similar places. This allowed for unnecessary variation.
Always calling url() makes the url lists look less noisy and more uniform,
allowing the reader to focus on the actual differences of the urls instead
of superfluities.
django.conf.urls.patterns will also undergo deprecation starting from
Django 1.8. This commit anticipates that change.
https://docs.djangoproject.com/en/dev/releases/1.8/#django-conf-urls-patterns
Changing a unofficially deprecated model name is clearer than having
three places to get at the same model.
The name 'AbstractBase' is consistent both with our naming of other
abstract models, and lots of apps having a Base class.
This is a common and useful Oscar pattern, and there's no reason to not
use it for the shipping app.
They are not imported anywhere in Oscar and just provided for
convenience, so no imports had to be altered.
Make access check function for dashboard easier to customise
* It can now be specified in OSCAR_DASHBOARD_DEFAULT_ACCESS_FUNCTION
* nav.py and menu.py were split up so that Node can be dynamically
loaded and hence overridden
I recently needed to alter the access function and realised it's not as
easy as I thought.
Issue #1191 highlighted some confusion around the structure of static
files in Oscar. It's been marginally improved to hopefully clarify the
intentions.
The customisation section required some changes as it's not often
necessary to override the root application instance to change URLs or
views of subapps.
This involves some quite involved changes to the internals of how offers
and organised. A new boolean field has been added to the offer model to
indicate whether to apply to prices exclusive of tax. This is used
within the offer methods to determine whether a basket meets a
condition, and how to apply the benefit if it does.
Fixes #925
Fixes #924
- make sure all pages are linked from somewhere
- prohibit double indexing of source code modules
- remove old unused offers (we use GIT, no need to keep old files)
- use local version of Oscar logo
Fixes #921
Update the docs regarding migrations for custom user model
The docs on pitfalls with migrations and a custom user model are
not accurate anymore since migrations in Oscar have been fixed. Hence
this update them.