Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

v3.2.rst 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ========================================
  2. Oscar 3.2 release notes
  3. ========================================
  4. :release: 2022-23-12
  5. .. contents::
  6. :local:
  7. :depth: 1
  8. .. _compatibility_of_3.2:
  9. Compatibility
  10. ~~~~~~~~~~~~~
  11. Oscar 3.2 is compatible with Django 3.1 and Django 3.2 and Python versions 3.7 to 3.9.
  12. Support for Django 2.2 has been dropped. Support for Python 3.6 has been dropped.
  13. .. _new_in_3.2:
  14. What's new in Oscar 3.2?
  15. ~~~~~~~~~~~~~~~~~~~~~~~~
  16. - ``oscar.order.mixins.EventHandlerMixin`` was created for easily using the EventHandler without manually create the handler every time.
  17. - Added more product option types:
  18. - Select
  19. - Radio
  20. - Multi select
  21. - Checkbox
  22. - 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.
  23. .. _backwards_incompatible_in_3.2:
  24. Backwards incompatible changes
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. - The interface for the OPTION_FIELD_FACTORIES has changed and now receives the
  27. form, the product and the option. Update your overrides as required.
  28. - The ``value`` field on the ``BasketLineAttribute`` and ``OrderLineAttribute`` models is a JSONField now. If you have overridden the ``description`` property on the ``BasketLine`` and ``OrderLine`` models, you'll need to change this to make sure options/multi options are displayed normally in the basket and order.
  29. - 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.
  30. .. _removal_of_deprecated_features_in_3.2:
  31. Removal of deprecated features
  32. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. - ``url_has_allowed_host_and_scheme`` is no longer present in ``oscar.core.compat`` and should be directly imported as ``django.utils.http.url_has_allowed_host_and_scheme``
  34. .. _minor_changes_in_3.2:
  35. Minor changes
  36. ~~~~~~~~~~~~~
  37. - Added a new helper ``core.utils.is_ajax`` which replicates the logic of Django's ``HttpRequest.is_ajax``
  38. method that was deprecated in Django 3.1.
  39. - Persisted ``OrderFactory.date_placed`` to the database when set, instead of just setting it on the object without saving it.
  40. - Fixed getting non public categories with ``get_categories`` by only returning browsable categories.
  41. - Reviews can now only be viewed and placed when the product is public.
  42. - 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.
  43. - Changed ``PartnerProductFilterMixin`` queryset to also include child products for the partner user.
  44. - Changed ``RangeDetailView`` to respect the ``OSCAR_PRODUCTS_PER_PAGE`` setting for pagination.
  45. - Fixed the output of the ``OfferReportGenerator`` and generated it's data more efficiently.
  46. - Avoid ``KeyError`` in ``BulkEditMixin`` if objects matching filters no longer exist.
  47. - Changed the order of ``check_skip_conditions`` and ``check_pre_conditions``.
  48. - Made it easier to pass custom arguments to order processing ``EventHandler``.
  49. - Fixed the handling of ``InvalidPage`` exceptions in ``CatalogueView``.
  50. - Added ``search_fields`` to ``AbstractAddress`` model.
  51. - Added a uniqueness constraint across ``code`` and ``product_class`` for the ``ProductAttribute`` model to prevent duplicate attribute codes. This comes with a migration that will remove duplicate codes before applying the unique constraint migration.
  52. - Implemented a more efficient approach for range queries. This will make (for example) multiple offers in your site a lot faster.
  53. - Made the attribute codes unique per product class
  54. - Changed the review form to as_stars filter instead of if statements
  55. - Prevent unnecessary database query in UseFirstStockRecord strategy
  56. - Fix the issue where html5 validation errors were not shown in the dashboard.
  57. - Changed the stock to be consumed and allocated in an atomic state.
  58. - Fixed not requiring a range when choosing a custom condition
  59. - Changed the basket to be readonly in the django-admin
  60. - 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.
  61. - Added basket post data back to the form when invalid
  62. .. _dependency_changes_in_3.2:
  63. Dependency changes
  64. ~~~~~~~~~~~~~~~~~~
  65. Python package dependencies:
  66. - Upgraded ``django-treebeard`` to version >=4.3.0
  67. - Upgraded ``django-phonenumber-field`` to version >=4.0.0,<7.0.0
  68. - Upgraded ``django-extra-views`` to version >=0.13,<0.15
  69. Javascript and CSS dependencies:
  70. - Upgraded ``@fortawesome/fontawesome-free`` to version 6.1.1.
  71. - Upgraded ``bootstrap`` to version 4.6.1.
  72. - Upgraded ``inputmask`` to version 5.0.7.
  73. - Upgraded ``tinymce`` to version 6.0.3.
  74. - Upgraded ``eslint`` to version 8.16.0.
  75. - Upgraded ``nan`` to version 2.16.0.
  76. - Upgraded ``sass`` to version 1.52.1.
  77. - Upgraded ``tempusdominus-bootstrap-4`` to version 5.39.2.
  78. Deprecated features
  79. ~~~~~~~~~~~~~~~~~~~
  80. - The ``annotate_form_field`` template tag is deprecated. It's functionality of annotating form fields with
  81. their widget type is now built in to Django.
  82. - In the ORDER_PLACED email templates, the variable ``status_url`` should not be used anymore. Please use
  83. ``status_path`` in conjunction with the ``absolute_url`` template tag instead. It will be removed in a future
  84. version of Oscar.