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 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. Removal of deprecated features
  20. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21. - Support for deprecated product alert email templates was removed The templates
  22. for these emails have been replaced as follows:
  23. - ``customer/alerts/emails/confirmation_subject.txt`` is replaced by
  24. ``customer/emails/commtype_product_alert_confirmation_subject.txt``
  25. - ``customer/alerts/emails/confirmation_body.txt`` is replaced by
  26. ``customer/emails/commtype_product_alert_confirmation_body.txt``
  27. - ``customer/alerts/emails/alert_subject.txt`` is replaced by
  28. ``customer/emails/commtype_product_alert_subject.txt``
  29. - ``customer/alerts/emails/alert_body.txt`` is replaced by
  30. ``customer/emails/commtype_product_alert_body.txt``
  31. Product alert emails are now sent as Communication Events.
  32. - Support for category URLs without a primary key was removed.
  33. Enforcement of unique slugs for categories was also removed, as enforcing
  34. this was inefficient and not threadsafe. Since a primary key is now required
  35. for category URLs, there is no need for slugs to be unique.
  36. - ``customer.forms.SetPasswordForm`` and ``customer.forms.PasswordChangeForm``
  37. have been removed. Use ``django.contrib.auth.forms.SetPasswordForm`` and
  38. ``django.contrib.auth.forms.PasswordChangeForm`` instead.
  39. - The ``views.decorators.staff_member_required`` decorator has been removed. Use
  40. ``permissions_required(['is_staff']`` instead.
  41. - The ``UserAddress.num_orders`` property has been removed. Use
  42. ``num_orders_as_shipping_address`` and ``num_orders_as_billing_address``
  43. instead.
  44. - Backward-compatible dynamic loading of formset classes that have moved in Oscar was
  45. removed. Projects must update their ``get_class`` calls to use the new paths.
  46. The paths that have changed are as follows:
  47. ================================ ================================== ================
  48. Old path New path Affected classes
  49. ================================ ================================== ================
  50. ``basket.forms`` ``basket.formsets`` ``BaseBasketLineFormSet``
  51. ``BasketLineFormSet``
  52. ``BaseSavedLineFormSet``
  53. ``SavedLineFormSet``
  54. ``dashboard.catalogue.forms`` ``dashboard.catalogue.formsets`` ``BaseStockRecordFormSet``
  55. ``StockRecordFormSet``
  56. ``BaseProductCategoryFormSet``
  57. ``ProductCategoryFormSet``
  58. ``BaseProductImageFormSet``
  59. ``ProductImageFormSet``
  60. ``BaseProductRecommendationFormSet``
  61. ``ProductRecommendationFormSet``
  62. ``ProductAttributesFormSet``
  63. ``dashboard.promotions.forms`` ``dashboard.promotions.formsets`` ``OrderedProductFormSet``
  64. ``wishlists.forms`` ``wishlists.formsets`` ``LineFormset``
  65. ================================ ================================== ================
  66. Minor changes
  67. ~~~~~~~~~~~~~
  68. - Dropped ``action=""`` and ``action="."`` attributes, following the lead of Django
  69. and as per the HTML5 specification.
  70. - Replaced use of Django's procedural auth views with the corresponding
  71. class-based views.
  72. - ``OrderPlacementMixin.get_message_context()`` is now passed a ``code`` argument
  73. specifying the communication event type code for a message being sent.
  74. - We've dropped the dependency on Unidecode due to license incompatibilities,
  75. ``oscar.core.utils.default_slugifier`` now uses ``oscar.core.utils.cautious_slugify``
  76. to handle unicode characters in slugs when ``OSCAR_SLUG_ALLOW_UNICODE`` is ``False``.
  77. - ``OSCAR_SLUG_FUNCTION`` previously accepted a function as its value. It now
  78. only accepts a dotted path to a function as its value. Such functions must
  79. also now take a ``allow_unicode`` kwarg.
  80. - Fixed input validation for ``dashboard.offers.forms.BenefitForm`` when a ``range``
  81. was specified but other fields were empty.
  82. - Fixed calculation of weight-based shipping charges in cases where the basket
  83. weight is an exact multiple of a weight band's upper limit.
  84. - The ``sort_by`` field on ``catalogue.reviews.SortReviewsForm`` was made optional
  85. and the logic in ``ProductReviewList`` adjusted so that the form fields
  86. don't have to be rendered manually because of form errors.
  87. Dependency changes
  88. ------------------
  89. .. _deprecated_features_in_2.0:
  90. Deprecated features
  91. ~~~~~~~~~~~~~~~~~~~
  92. - ``offer.Range.contains()`` is deprecated. Use ``contains_product()`` instead.
  93. - ``catalogue.managers.ProductManager`` is deprecated.
  94. Use ``catalogue.managers.ProductQuerySet.as_manager()`` instead.
  95. - ``catalogue.managers.BrowsableProductManager`` is deprecated.
  96. Use ``Product.objects.browsable()`` instead.