Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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