You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v2.0.rst 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. =======================
  2. Oscar 2.0 release notes
  3. =======================
  4. :release: tbd
  5. Welcome to Oscar 2.0
  6. Table of contents:
  7. .. contents::
  8. :local:
  9. :depth: 1
  10. .. _compatibility_of_2.0:
  11. Compatibility
  12. -------------
  13. Oscar 2.0 is compatible with Django 1.11, Django 2.0 and Django 2.1 as well as
  14. Python 3.5 and 3.6.
  15. Support for Python 2.7 and Python 3.4 has been dropped.
  16. .. _new_in_2.0:
  17. What's new in Oscar 2.0?
  18. ------------------------
  19. - Added an ``order.OrderStatusChange`` model that is used to log order status changes
  20. applied by ``Order.set_status()``. This is a new model which will require database migrations to be applied.
  21. - Added an ``OSCAR_OFFERS_INCL_TAX`` setting which can be used to configure whether
  22. offer discounts are applied on the tax-inclusive amount. This defaults to ``False``,
  23. to preserve the original behaviour of discount application.
  24. - Added database index definitions for commonly queried fields in a range of models. See `#2875`_.
  25. This will require projects that have forked Oscar apps to generate corresponding migrations.
  26. .. _`#2875`: https://github.com/django-oscar/django-oscar/pull/2875
  27. Removal of deprecated features
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. - Support for deprecated product alert email templates was removed The templates
  30. for these emails have been replaced as follows:
  31. - ``customer/alerts/emails/confirmation_subject.txt`` is replaced by
  32. ``customer/emails/commtype_product_alert_confirmation_subject.txt``
  33. - ``customer/alerts/emails/confirmation_body.txt`` is replaced by
  34. ``customer/emails/commtype_product_alert_confirmation_body.txt``
  35. - ``customer/alerts/emails/alert_subject.txt`` is replaced by
  36. ``customer/emails/commtype_product_alert_subject.txt``
  37. - ``customer/alerts/emails/alert_body.txt`` is replaced by
  38. ``customer/emails/commtype_product_alert_body.txt``
  39. Product alert emails are now sent as Communication Events.
  40. - Support for category URLs without a primary key was removed.
  41. Enforcement of unique slugs for categories was also removed, as enforcing
  42. this was inefficient and not threadsafe. Since a primary key is now required
  43. for category URLs, there is no need for slugs to be unique.
  44. - ``customer.forms.SetPasswordForm`` and ``customer.forms.PasswordChangeForm``
  45. have been removed. Use ``django.contrib.auth.forms.SetPasswordForm`` and
  46. ``django.contrib.auth.forms.PasswordChangeForm`` instead.
  47. - The ``views.decorators.staff_member_required`` decorator has been removed. Use
  48. ``permissions_required(['is_staff']`` instead.
  49. - The ``UserAddress.num_orders`` property has been removed. Use
  50. ``num_orders_as_shipping_address`` and ``num_orders_as_billing_address``
  51. instead.
  52. - Backward-compatible dynamic loading of formset classes that have moved in Oscar was
  53. removed. Projects must update their ``get_class`` calls to use the new paths.
  54. The paths that have changed are as follows:
  55. ================================ ================================== ================
  56. Old path New path Affected classes
  57. ================================ ================================== ================
  58. ``basket.forms`` ``basket.formsets`` ``BaseBasketLineFormSet``
  59. ``BasketLineFormSet``
  60. ``BaseSavedLineFormSet``
  61. ``SavedLineFormSet``
  62. ``dashboard.catalogue.forms`` ``dashboard.catalogue.formsets`` ``BaseStockRecordFormSet``
  63. ``StockRecordFormSet``
  64. ``BaseProductCategoryFormSet``
  65. ``ProductCategoryFormSet``
  66. ``BaseProductImageFormSet``
  67. ``ProductImageFormSet``
  68. ``BaseProductRecommendationFormSet``
  69. ``ProductRecommendationFormSet``
  70. ``ProductAttributesFormSet``
  71. ``dashboard.promotions.forms`` ``dashboard.promotions.formsets`` ``OrderedProductFormSet``
  72. ``wishlists.forms`` ``wishlists.formsets`` ``LineFormset``
  73. ================================ ================================== ================
  74. - Added the ability to manage ``catalogue.Option`` objects from the dashboard.
  75. Minor changes
  76. ~~~~~~~~~~~~~
  77. - Dropped ``action=""`` and ``action="."`` attributes, following the lead of Django
  78. and as per the HTML5 specification.
  79. - Replaced use of Django's procedural auth views with the corresponding
  80. class-based views.
  81. - ``OrderPlacementMixin.get_message_context()`` is now passed a ``code`` argument
  82. specifying the communication event type code for a message being sent.
  83. - We've dropped the dependency on Unidecode due to license incompatibilities,
  84. ``oscar.core.utils.default_slugifier`` now uses ``oscar.core.utils.cautious_slugify``
  85. to handle unicode characters in slugs when ``OSCAR_SLUG_ALLOW_UNICODE`` is ``False``.
  86. - ``OSCAR_SLUG_FUNCTION`` previously accepted a function as its value. It now
  87. only accepts a dotted path to a function as its value. Such functions must
  88. also now take a ``allow_unicode`` kwarg.
  89. - Fixed input validation for ``dashboard.offers.forms.BenefitForm`` when a ``range``
  90. was specified but other fields were empty.
  91. - Fixed calculation of weight-based shipping charges in cases where the basket
  92. weight is an exact multiple of a weight band's upper limit.
  93. - The ``sort_by`` field on ``catalogue.reviews.SortReviewsForm`` was made optional
  94. and the logic in ``ProductReviewList`` adjusted so that the form fields
  95. don't have to be rendered manually because of form errors.
  96. - Added a ``datetime_filters`` tag library that provides a ``timedelta`` template
  97. filter for rendering time deltas in human readable format.
  98. - ``OSCAR_OFFER_ROUNDING_FUNCTION`` previously accepted a function as its value. It now
  99. only accepts a dotted path to a function as its value
  100. - Fixed the logic of ``offers.Range.all_products()`` to make it consistent with
  101. ``Range.contains_product()`` in excluding products specified in ``excluded_product_ids``.
  102. - Added a ``COMPARISON_FIELDS`` constant to ``catalogue.Category`` to restrict
  103. which fields are fetched from the database when performing category comparison queries.
  104. .. _incompatible_in_2.0:
  105. Backwards incompatible changes in Oscar 2.0
  106. -------------------------------------------
  107. - Redirection to the parent detail view for child products is disabled by default.
  108. Child products now have their own detail view, which allows displaying their price
  109. and images independently from the parent product. To revert to the previous behaviour
  110. of redirecting to the parent product, set
  111. ``oscar.apps.catalogue.views.ProductDetailView.enforce_parent`` to ``False``.
  112. Dependency changes
  113. ------------------
  114. - Upgraded TinyMCE to version 4.8.3.
  115. - Upgraded jQuery inputmask to version 4.0.2.
  116. .. _deprecated_features_in_2.0:
  117. Deprecated features
  118. ~~~~~~~~~~~~~~~~~~~
  119. - ``offer.Range.contains()`` is deprecated. Use ``contains_product()`` instead.
  120. - ``catalogue.managers.ProductManager`` is deprecated.
  121. Use ``catalogue.managers.ProductQuerySet.as_manager()`` instead.
  122. - ``catalogue.managers.BrowsableProductManager`` is deprecated.
  123. Use ``Product.objects.browsable()`` instead.