Unify to (basket, user=None, request=None) argument order in Applicator
This order offers the simplest API for common needs - as evidenced by the
fact that the apply_offers crook could be removed from two test files,
saving on imports as well.
Deprecate accessing categories without primary key
That approach is around from sometime around Oscar 0.6. With the
category refactor, it has become expensive to support. I doubt it has
any SEO impact, as e.g. Amazon has product IDs etc. all over their URLs.
@mbertheau seconded this opinion.
Previously, all views handled in Oscar's Application class were
decorated with the permissions_required decorator. That decorator would
not do anything if used with an empty set of permissions, but it
nonetheless seems cleaner to not decorate the views in the first place.
Raised in:
https://github.com/django-oscar/django-oscar-api/pull/2/files#r23832083
Unfortunately, I completely missed the host argument to is_safe_url.
Without it, the check will have always returned False (see #1557).
This change fixes this behaviour. Unfortunately, it does require
changing the notation of the safe_referrer and redirect_to_referrer
utility functions.
They are from a time when we had one stockrecord per product, and no
strategy classes. They're used for visual purposes only, and were
forgotten when the codebase was updated. They failed loudly, as reported
in #1592.
We really need to either drop them or add a helper method to the
strategy class, but to ensure backwards-compatibility, I've
re-implemented the naive approach of just sorting by price; blindly
ignoring the many shortcomings.
I also added a deprecation notice.
[Forwardport] Fix bug with __all__ creation in partner app
A simple typo lead to star imports not working as expected. As it's
easily worked around, we won't issue a release right away.
Closes #1553.
(cherry picked from commit 80babf2c19)
Conflicts:
docs/source/releases/index.rst
Oscar is in production at major companies, and has proven itself in all
kinds of scenarios. It's time the version number acknowledges that.
This means there never will be a 0.8 final release; only betas were
released as 0.8 version.
This commit removes a few long deprecated bits in the docs and in
code. It also updates the
release notes to include those removals, and highlights what has been
deprecated in 0.8. And it fixes a Sphinx warning when building the docs.
Changes include:
- New section on organisation
- General moving round of sections, especially around backwards
incompatibilities
- Various copy changes
Explicitly pass the billing address around checkout
This changeset adjusts `build_submission` to include the billing address.
This also requires changes to a few method signatures to handle the
billing address explicitly.
This only works when the billing address is stored in the session (as
that's where it is looked up from when building the submission data in
`build_submission`). In many cases (such as Oscar's demo site), we don't
store the billing address in the session - instead, it is captured via
the payment-details forms. Hence, the billing address will still need to
be explicitly set within the submission data.
Fixes #1508
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.
pysolr 3.2 has been released. This commit removes the workaround we had
to do to get pysolr 3.1 not failing loudly on Solr 4 error messages.
Instead, we warn the user, and document that one needs to ugprade.
Parent/child products aren't supported in permission-based dashboard
Currently, a product's stockrecords are used to decide if a user is
allowed to edit a product or not. That doesn't work for parent products,
because they don't have stockrecords. So it's not possible to decide
whether a user is allowed to edit a parent product (and e.g. create
children) for it.
As far as I'm aware, this is not a regression of the
permission-dashboard; I don't think it ever worked. It just hasn't been
spotted because nobody needed it.
This commit also adds some tests to ensure this is enforced.
* Fixed a few minor wording issues
* Removed the overview section. I think the "What's new" headlines do a
good job, and the existing content wasn't really suitable to give a
nice overview.
* Reduced importance of "Customisation got easier" and "shipping app"
by moving it further down the list. There's more exciting changes
in this release, and nobody gets excited about us breaking backwards
compatibility...
* Add release notes for search changes.
* Drop a random list of explaining product structure, probably a
copy-paste error
* Moved "cleanup around shipping methods" section into breaking changes,
because really they are. Also removed a duplicate entry, and the entry
on the since removed upper_limit field.