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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. ========================================
  2. Oscar 2.1 release notes (in development)
  3. ========================================
  4. :release: tbd
  5. Welcome to Oscar 2.1.
  6. .. contents::
  7. :local:
  8. :depth: 1
  9. .. _compatibility_of_2.1:
  10. Compatibility
  11. ~~~~~~~~~~~~~
  12. .. _new_in_2.1:
  13. What's new in Oscar 2.1?
  14. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. - The database performance of ``offer.Range.all_products()`` was substantially
  16. improved. The internals of that method have changed and specifically
  17. ``Range.invalidate_cached_ids()`` has been removed and replaced with
  18. ``Range.invalidate_cached_queryset()``.
  19. - The ``upload_to`` argument of image fields in Oscar's ``ProductImage`` and
  20. ``ProductAttributeValue`` models was changed to use a callable, so that
  21. Django doesn't generate migrations if a project modifies the ``OSCAR_IMAGE_FOLDER``
  22. to specify a custom directory structure for uploaded images.
  23. - ``catalogue.Category`` now has an ``is_public`` boolean field that serves a
  24. similar purpose to ``catalogue.Product.is_public`` - i.e., hides them from
  25. public views. The ``Category`` model also now has a custom manager
  26. that provides a ``browsable()`` queryset method that excludes non-public
  27. categories. This changes requires a database migration.
  28. Category hierarchy implies that the children of any non-public category are
  29. also non-public. This is enforced through an ``ancestors_are_public`` field
  30. on the ``Category`` model.
  31. - A ``date_updated`` field was added to the ``basket.Line`` model, which is updated
  32. every time a line is saved. This change requires a database migration.
  33. Communications app
  34. ------------------
  35. A new ``communication`` app was introduced to provide a single point of entry
  36. for all communications sent by Oscar. This is a significant change with implications
  37. as follows:
  38. - Projects will need to add
  39. ``oscar.apps.communication.apps.CommunicationConfig`` to ``INSTALLED_APPS``.
  40. The ``CommunicationEventType``, ``Email`` and ``Notification`` models have
  41. moved from the ``customer`` app to the ``communication`` app. In order to
  42. preserve existing data, the table names for these models are unchanged.
  43. This is a change that requires database migration.
  44. - The ``Dispatcher`` class moved from ``customer.utils`` to
  45. ``communication.utils``. ``Dispatcher`` is now responsible for sending
  46. all notifications, and not just emails.
  47. - A ``CustomerDispatcher`` utility class that wraps the core ``Dispatcher``
  48. has been introduced to the ``customer`` app for sending communications to
  49. customers.
  50. - An ``AlertsDispatcher`` utility class that wraps the core ``Dispatcher``
  51. has been introduced to the ``customer.alerts`` module for sending product
  52. alerts.
  53. - An ``OrderDispatcher`` utility class that wraps the core ``Dispatcher``
  54. has been introduced to the ``order`` app for sending order related
  55. communications.
  56. - A new setting, ``OSCAR_SAVE_SENT_EMAILS_TO_DB`` controls whether emails
  57. sent through the ``Dispatcher`` are saved to the database. This defaults
  58. to ``True``.
  59. - The ability to send multipart emails with attachments was added to the new
  60. dispatcher.
  61. - All communication email templates (``commtype_*``) have moved from
  62. moved from ``customer/emails`` to ``communication/emails``.
  63. - Templates in ``customer/email/`` and ``customer/notification/`` have moved
  64. to ``communication/email/`` and ``communication/notification/``.
  65. - An ``absolute_url`` template tag was introduced to facilitate generating
  66. absolute URLs in templates for a given domain and path. The schema for
  67. generated URLs is configured via the ``OSCAR_URL_SCHEMA`` setting, which defaults
  68. to ``http``.
  69. Backwards incompatible changes in Oscar 2.1
  70. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71. - The ``category`` field has been removed from the
  72. ``communication.Notification`` model. This change requires database migration.
  73. - The ``checkout.mixins.OrderPlacementMixin.send_confirmation_message``
  74. method has been replaced with a new ``send_order_placed_email`` method.
  75. - ``customer.notifications.context_processors.notifications`` has moved to
  76. ``communication.notifications.context_processors.notifications``.
  77. Bug fixes
  78. ~~~~~~~~~
  79. - Fixed a bug in the handling of requests to save an item in the basket for
  80. later(:issue:`3215`).
  81. - Fixed an error when deleting an offer whose related conditions/benefits have
  82. been deleted.
  83. Removal of deprecated features
  84. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  85. - Support for verifying order hashes using an insecure MD5 algorithm generated
  86. by Oscar 1.5 and below has been dropped. The ``OSCAR_DEPRECATED_ORDER_VERIFY_KEY``
  87. setting is no longer used. Order verification hashes generated by Oscar 1.5
  88. and lower will no longer validate.
  89. - ``offer.Range.contains()`` has been removed. Use ``contains_product()`` instead.
  90. - ``catalogue.managers.ProductManager`` has been removed. Use
  91. ``catalogue.managers.ProductQuerySet.as_manager()`` instead.
  92. - ``catalogue.managers.BrowsableProductManager`` has been removed. Use
  93. ``Product.objects.browsable()`` instead.
  94. - ``catalogue.Product.browsable`` has been removed. Use
  95. ``Product.objects.browsable()`` instead.
  96. - Invalid URLs supplied to ``OSCAR_DASHBOARD_NAVIGATION`` are no longer ignored.
  97. URLs that cannot be resolved will now result in a ``NoReverseMatch`` exception.
  98. URLs that are not provided by a subclass of ``oscar.core.application.OscarDashboardConfig``
  99. will result in a ``KeyError``.
  100. Minor changes
  101. ~~~~~~~~~~~~~
  102. - ``OrderPlacementMixin.place_order`` now ignores inactive vouchers when placing
  103. an order (instead of raising an exception), for consistency with how
  104. the basket flows handle inactive vouchers.
  105. - Fixed the logic of ``StockRequired.parent_availability_policy`` to use
  106. child products to determine availability of children, rather than the parent.
  107. - ``customer.forms.PasswordResetForm`` now uses the parent class' ``get_users()``
  108. method to determine the list of users to send an email to. ``get_users()``
  109. filters out users who do not currently have a usable password - which
  110. did not happen previously.
  111. This change was made in response to changes in Django to address
  112. CVE-2019-19844. Oscar's ``PasswordResetForm`` was not vulnerable to the issue
  113. in Django's form, but it was possible to send a password reset email to
  114. unintended recipients because of unicode character collision.
  115. - ``catalogue.Product.is_public`` is now an indexed field. This change requires
  116. a database migration.
  117. Dependency changes
  118. ~~~~~~~~~~~~~~~~~~
  119. - Upgraded ``django-phonenumber-field`` to use the latest in the 3.x series.
  120. - Upgraded ``select2`` to version 4.0.10.
  121. - Upgraded ``inputmask`` to version 4.0.8.
  122. .. _deprecated_features_in_2.1:
  123. Deprecated features
  124. ~~~~~~~~~~~~~~~~~~~
  125. - ``customer.alerts.utils.send_alerts`` is deprecated.
  126. Use ``AlertsDispatcher.send_alerts`` instead.
  127. - ``customer.alerts.utils.send_alert_confirmation`` is deprecated.
  128. Use ``AlertsDispatcher.send_product_alert_confirmation_email_for_user``
  129. instead.
  130. - ``customer.alerts.utils.send_product_alerts`` is deprecated.
  131. Use ``AlertsDispatcher.send_product_alert_email_for_user`` instead.
  132. - ``customer.notifications.services.notify_user`` is deprecated.
  133. Use Dispatcher.notify_user``.
  134. - ``customer.notifications.services.notify_users`` is deprecated.
  135. Use ``Dispatcher.notify_users`` instead.
  136. - ``customer.forms.PasswordResetForm.get_reset_url`` has been removed.
  137. - ``customer.views.ProfileUpdateView.form_valid`` was modified
  138. to use a new ``send_email_changed_email`` method.
  139. - ``customer.views.ChangePasswordView.form_valid`` was modified
  140. to use a new ``send_password_changed_email`` method.
  141. - The internal class ``oscar.core.compat.UnicodeSCVReader`` has been removed.
  142. Use ``csv.reader`` instead.