Convert readthedocs link for their .org -> .io migration for hosted projects
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:
> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.
Test Plan: Manually visited all the links I’ve modified.
doc: Fix CheckoutSessionMixin example for DeferredTax strategy
Fix several issues with the CheckoutSessionMixin example given for
using a DeferredTax tax assessment approach:
- Test for submission['shipping_address'] and
submission['shipping_method'].
- Update line item tax via line.purchase_info.price.tax.
- Refer to shipping_charge rather than shipping_method where
appropriate.
- Base the shipping tax rate on the tax-exclusive, not tax-inclusive
shipping charge.
- Fix indentation for the calculate_tax convenience function.
Fixes issue django-oscar/django-oscar#1966.
The demo site was not kept up to date with the recent changes in Oscar
due to time contraints. It should be moved to a separate demo repository
in the future.
django-compressor used to trigger processing of the less files during
development. But with the browser-based compiler, an easy replacement is
available. This even lowers the barrier to altering styles, because
getting npm up and running isn't required.
Offline compilation isn't impacted.
Using the most current less version seems to not cause any trouble, so I
removed the version requirement.
Transactions were improved with Django 1.6; the atomic decorator was
added at the same time. We could've removed this helper earlier, but
better late than never.
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.