Oscar 3.2 release notes¶
Oscar 3.2 is compatible with Django 3.1 and Django 3.2 and Python versions 3.7 to 3.9.
Support for Django 2.2 has been dropped. Support for Python 3.6 has been dropped.
What’s new in Oscar 3.2?¶
oscar.order.mixins.EventHandlerMixinwas created for easily using the EventHandler without manually create the handler every time.
- Added more product option types:
Wishlists are now shareable, inside your account you can make your wishlist private(default), public or shared. Public wishlists are available for everyone, shared wishlists only for the emails the user allowed access to.
Backwards incompatible changes¶
The interface for the OPTION_FIELD_FACTORIES has changed and now receives the form, the product and the option. Update your overrides as required.
valuefield on the
OrderLineAttributemodels is a JSONField now. If you have overridden the
descriptionproperty on the
OrderLinemodels, you’ll need to change this to make sure options/multi options are displayed normally in the basket and order.
The wishlist create and update view now inherits from a new mixin that shares functionality. If you’ve overrides on those views, you should check to see if everything works as intended.
Removal of deprecated features¶
url_has_allowed_host_and_schemeis no longer present in
oscar.core.compatand should be directly imported as
Added a new helper
core.utils.is_ajaxwhich replicates the logic of Django’s
HttpRequest.is_ajaxmethod that was deprecated in Django 3.1.
OrderFactory.date_placedto the database when set, instead of just setting it on the object without saving it.
Fixed getting non public categories with
get_categoriesby only returning browsable categories.
Reviews can now only be viewed and placed when the product is public.
The title has been removed by default from all address forms in Oscar. The database field is still present, and projects that wish to retain this field in their forms should add it back by overriding the fields property of the Meta class for applicable forms.
PartnerProductFilterMixinqueryset to also include child products for the partner user.
RangeDetailViewto respect the
OSCAR_PRODUCTS_PER_PAGEsetting for pagination.
Fixed the output of the
OfferReportGeneratorand generated it’s data more efficiently.
BulkEditMixinif objects matching filters no longer exist.
Changed the order of
Made it easier to pass custom arguments to order processing
Fixed the handling of
Added a uniqueness constraint across
ProductAttributemodel to prevent duplicate attribute codes. This comes with a migration that will remove duplicate codes before applying the unique constraint migration.
Implemented a more efficient approach for range queries. This will make (for example) multiple offers in your site a lot faster.
Made the attribute codes unique per product class
Changed the review form to as_stars filter instead of if statements
Prevent unnecessary database query in UseFirstStockRecord strategy
Fix the issue where html5 validation errors were not shown in the dashboard.
Changed the stock to be consumed and allocated in an atomic state.
Fixed not requiring a range when choosing a custom condition
Changed the basket to be readonly in the django-admin
The request is now passed to all the communication event type messages, so emails can be sent from the correct site in case of a multisite project.
Added basket post data back to the form when invalid
Python package dependencies:
django-treebeardto version >=4.3.0
django-phonenumber-fieldto version >=4.0.0,<7.0.0
django-extra-viewsto version >=0.13,<0.15
@fortawesome/fontawesome-freeto version 6.1.1.
bootstrapto version 4.6.1.
inputmaskto version 5.0.7.
tinymceto version 6.0.3.
eslintto version 8.16.0.
nanto version 2.16.0.
sassto version 1.52.1.
tempusdominus-bootstrap-4to version 5.39.2.
annotate_form_fieldtemplate tag is deprecated. It’s functionality of annotating form fields with their widget type is now built in to Django.
In the ORDER_PLACED email templates, the variable
status_urlshould not be used anymore. Please use
status_pathin conjunction with the
absolute_urltemplate tag instead. It will be removed in a future version of Oscar.