Oscar 1.6 release notes¶
Welcome to Oscar 1.6
Table of contents:
Oscar 1.6 is compatible with Django 1.11 and Django 2.0 as well as Python 2.7, 3.4, 3.5 and 3.6.
Official support for Django 1.8, 1.9 and 1.10 has been dropped.
What’s new in Oscar 1.6?¶
Added support for managing large amounts of vouchers grouped in sets.
Removal of deprecated features¶
oscar.core.phonenumber.PhoneNumberis removed. Use
Removed the redundant
The majority of the Oscar class imports now use dynamic loading, instead of direct imports, for better extensibility and customisability.
Added the ability to specify a custom class loader through the
Customer transaction emails were reworked to use Mailgun templates, so that they have a more modern appearance.
SearchHandler.get_search_formmethod now accepts additional keyword arguments, which will be passed on search form class instance.
oscar.apps.basket.models.Basketfor implementing strategies that depend on product options.
Fixed the page create/update views in the dashboard to correctly validate URLs. Invalid characters in URLs will raise a validation error, as will URLs longer than 100 characters.
The default shipping method (
oscar.apps.basket.views.BasketView.get_default_shipping_address) on the basket summary page now uses the user’s default shipping address to calculate an indicative shipping cost.
ExtendedURLValidatorfor locale-prefixed URLs for locales, different from current (see #1481). Previously, validation did not pass when if the current locale was
en-gband, the a visited URL was
/de/catalogue/and visa versa due to Django’s default behaviour.
- Product attribute value save is now handled by separate methods, to make it
easier to override this behaviour.
Address hash generation is now separated from the summary in order to preserve same behaviour when summary property customised (see #1537). They can use different field names, listed out in base_fields and hash_fields respectively. Also hash generation now became platform-independent and generates the same for Python 2 and 3. Corresponding data migration will update hashes automatically. Take it into account that it will take time to run if you have large user base.
Compact basket form is no longer displayed for the products with options on product list pages since it caused form elements to impose inside the product box (see :issues:`1976`).
has_optionsproperty to the
oscar.apps.catalogue.models.Productmodel to indicate whether an instance or its product class has product options.
oscar.core.validators.validate_passwordwas removed. Use
oscar.core.validators.CommonPasswordValidatorwas removed. Use
User notifications are marked as read only when viewed in detail, instead of being marked as read in bulk when the notification list was viewed.
DateTimePickerInputall use templates for rendering.
It is now possible to manage images for variant products and their parents.
For variant products we now display their own images on product detail page and fallback to parent product images if they don’t have any.
Basket line form quantity field now has “max” attribute with the maximum allowed quantity in it based on product availability and basket threshold (see #1412).
An unused setting
OSCAR_SETTINGSwas removed from
Fixed ``PhoneNumberMixin``s handling of empty phone number fields in forms.
Backwards incompatible changes in Oscar 1.6¶
Fixed a regression introduced in Oscar 1.5 (see #2664) where
StockRequired.availability_policywas dependent on the product having a price. Price and availability are now decoupled, and it is possible to defer determination of a price until a product is added to the basket.
oscar.apps.customer.auth_backends.EmailBackendnow rejects inactive users (where
EmailBackendno longer enforces its own password strength validation, and relies instead on the
AUTH_PASSWORD_VALIDATORSsetting used by Django.
oscar.apps.basket.middleware.BasketMiddlewarewas rewritten as new-style middleware for Django 1.11.
oscar.apps.offer.models.ConditionalOffernow has a new flag
exclusiveto denote that the offer involved can not be combined on the same item on the same basket line with another offer. This flag is used by
oscar.apps.basket.utils.LineOfferConsumer, a facade that supersedes the old
oscar.apps.basket.models.Line._affected_itemscounter, and replaces it with a more fine-grained approach. This makes it possible to apply two distinct non-exclusive offers on the same line items, for example multiple distinct vouchers. A couple of methods on the
Linemodel have been extended with an optional
consume, so if you are using a customised
Linemodel, you have to update your methods’ signatures.
Invalid URL names supplied to the
OSCAR_DASHBOARD_NAVIGATIONsetting are now logged as an exception (previously they were silently ignored). The offending menu item will be skipped during menu rendering. In Oscar 1.8 the exception will be raised without being intercepted.
All signals are now loaded directly rather than using dynamic imports.
Stock manipulation (allocation/consumption/cancellation) now only happens if the
track_stockproperty of the product’s class is set to true.
oscar.forms.widgets.RemoteSelectwas updated to work with version 4 of select2. Instead of rendering a hidden input it now renders a normal
django-extra-viewsdependency was upgraded to version 0.11, and the basket views that rely on
extra_views.ModelFormSetViewupdated to use the new factory_kwargs attribute.
jQuery UI was removed from Oscar’s static files. Projects that require it should install it at the project level.
Compatibility for Internet Explorer version 9 an lower was dropped from Oscar’s templates and styles.
The Google Analytics tracking code provided by Oscar now uses
gtag.jsAPI instead of the deprecated
analytics.js. Analytics are also disabled by default in Oscar’s dashboard.
jqueryto version 3.3.1.
bootstrapto version 3.3.7.
The following features have been deprecated in this release:
StockRecord.price_excl_taxwill be renamed into
StockRecord.pricein Oscar 2.0. Please see #1962 for more details.
StockRecord.cost_pricefields are deprecated and will be removed in Oscar 2.0.
order.Line.line_price_excl_taxfields are deprecated and will be removed in Oscar 2.0.
oscar.views.decorators.staff_member_requiredis deprecated. Use
Support for Django 1.8, 1.9 and 1.10 has been dropped in line with the Django project recommendation for third party apps.