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.

v1.1.rst 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. ===========================================
  2. Oscar 1.1 release notes - UNDER DEVELOPMENT
  3. ===========================================
  4. :release: TBD
  5. .. warning::
  6. Since v1.1 has not been released yet, these release notes are still a work-in-progress.
  7. Welcome to Oscar 1.1!
  8. Table of contents:
  9. .. contents::
  10. :local:
  11. :depth: 1
  12. .. _compatibility_of_1.1:
  13. Compatibility
  14. -------------
  15. Oscar 1.1 is compatible with Django 1.7 and Django 1.8, and Python 2.7,
  16. 3.3 and 3.4. Support for Django 1.6, and hence South for migrations, has been
  17. removed.
  18. .. _new_in_1.1:
  19. What's new in Oscar 1.1?
  20. ------------------------
  21. * The frontend and backend templates have been updated to use Bootstrap 3
  22. instead of version 2 (`#1576`_). The frontend and backend templates are now
  23. also independent of each other.
  24. * Category slug, name and URL handling has been refactored to make it easier to
  25. translate categories, and to be able to edit slugs independent of names.
  26. * The icon and caption of `django-tables2` tables can be set directly on the `Table` object, if it
  27. derives from :class:`~oscar.apps.dashboard.tables.DashboardTable`. The caption can be localized
  28. in singular and plural. (`#1482`_)
  29. * All modelforms now specify the `fields` meta attribute instead of the `excludes` list.
  30. * Product class options and attributes can now be edited in the dashboard.
  31. * Oscar now ships with basic ElasticSearch support.
  32. ``OSCAR_PRODUCT_SEARCH_HANDLER`` has been introduced to more easily set the search backend.
  33. * The offer models can now also be customised the same way as was already
  34. possible for the other apps.
  35. .. _`#1576`: https://github.com/django-oscar/django-oscar/pull/1576
  36. .. _`#1482`: https://github.com/django-oscar/django-oscar/pull/1482
  37. .. _minor_changes_in_1.1:
  38. Minor changes
  39. ~~~~~~~~~~~~~
  40. - The `Order.date_placed` field can now be set explicitly rather than using the
  41. `auto_now_add` behaviour (`#1558`_).
  42. - The settings ``OSCAR_BASKET_COOKIE_SECURE`` and ``OSCAR_RECENTLY_VIEWED_COOKIE_SECURE``
  43. are introduced to set the ``secure`` flag on the relevant cookies.
  44. - Previously, all views handled in Oscar's Application class were decorated
  45. with the permissions_required decorator. That decorator would not do
  46. anything if used with an empty set of permissions. But it was raised as an
  47. issue, and now views not requiring permissions are not decorated at all.
  48. - Properly redirect users to the checkout page after a guest user created an
  49. account.
  50. - ``OSCAR_SEARCH_FACETS`` now accepts ordered dicts.
  51. - Oscar now supports varying the tax rate per product.
  52. .. _`#1558`: https://github.com/django-oscar/django-oscar/pull/1558
  53. .. _incompatible_changes_in_1.1:
  54. Backwards incompatible changes in 1.1
  55. -------------------------------------
  56. Categories refactor
  57. ~~~~~~~~~~~~~~~~~~~
  58. The Category model contained two denormalisations to improve performance: it
  59. stored the name of the category and it's ancestors in ``full_name``, and the
  60. ``slug`` field did not just contain the category's slug, but also the ones of
  61. it's ancestors.
  62. This came with several drawbacks: it was fiddly to move and update categories,
  63. as one had to ensure to update parts of the entire category tree. It also
  64. made it trickier to add model-level translation to categories.
  65. A refactoring removed the denormalisations leading to much simpler logic,
  66. and a light sprinkle of caching for the URLs hopefully leads to a performance
  67. net positive. But unfortunately it did come with some changes:
  68. * Category slug handling is changed. Historically, Oscar always updated the
  69. slug when the name changed. Now a slug is only created if no slug is given,
  70. and an existing slug is never overridden. This means that you can freely
  71. change the slugs, and a name change will not change the category's URL.
  72. * The ``full_name`` field has been *removed* and been replaced by a
  73. ``full_name`` property. Accessing that property incurs one database query to
  74. fetch the ancestors.
  75. * ``Category.get_absolute_url`` is now naively cached, as it's more costly to
  76. generate the URL than before. But as ``ProductCategoryView``, the view
  77. returned in ``get_absolute_url`` only considers the primary key and not the
  78. slug, even a stale cache should lead to the correct category page. But if
  79. you have altered that logic, please be sure to investigate.
  80. Those changes unfortunately do mean a data migration to update the slugs
  81. which *must* be run. Please see the section on migrations below. Please also
  82. ensure that, if you load your categories via fixtures, you update them
  83. accordingly: remove the ``full_name`` field and remove the ancestor's slugs
  84. from the ``slug`` field.
  85. Misc
  86. ~~~~
  87. * The :class:`~oscar.apps.shipping.abstract_models.AbstractWeightBased` shipping
  88. method now allows zero-weight baskets to have a non-zero shipping cost
  89. (`#1565`_). This means that sites that rely on zero-weight baskets having no
  90. change will need to introduce a new weight band that covers this edge case.
  91. * The methods :method:`~oscar.apps.offer.utils.Applicator.apply` and
  92. :method:`~oscar.apps.offer.utils.Applicatior.get_offers` changed their
  93. arguments to `(basket, user=None, request=None)`. (`#1677`_)
  94. .. _`#1565`: https://github.com/django-oscar/django-oscar/pull/1565
  95. .. _`#1677`: https://github.com/django-oscar/django-oscar/pull/1677
  96. Migrations
  97. ~~~~~~~~~~
  98. Migrations will get picked up automatically for apps you haven't customised.
  99. If you have customised any app, please consult the
  100. `detailed instructions <topics/upgrading>`_ on how to handle migrations.
  101. .. warning::
  102. This release contains a data migration for category slugs. If you have
  103. forked it, it is critical you run a copy of that migration when upgrading.
  104. .. warning::
  105. This release doesn't include any South migrations, as support for Django
  106. 1.6 has been dropped.
  107. Catalogue
  108. * This app contains model changes.
  109. * This app contains a data migration: ``0003_data_migration_slugs``.
  110. It shouldn't matter whether you apply this migration before or after
  111. the model changes.
  112. Dependency changes
  113. ------------------
  114. * Oscar now requires `django-treebeard` 3.0.
  115. .. _deprecated_features_in_1.1:
  116. Deprecated features
  117. ~~~~~~~~~~~~~~~~~~~
  118. The following features have been deprecated in this release:
  119. * For backwards compatibility, one can access the ``ProductCategoryView``
  120. without specifying a category PK in the URL. Oscar itself does not
  121. use this any more, and it will be removed with the next version of Oscar.
  122. * ``ProductSearchHandler`` has been renamed to ``SolrProductSearchHandler``.
  123. The old name will be removed in the next version of Oscar.
  124. Removal of deprecated features
  125. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126. These methods have been removed:
  127. * ``oscar.core.compat.atomic_compat``: Use ``django.db.transaction.atomic``
  128. instead.
  129. * ``oscar.core.loading.import_string``: Use
  130. ``django.utils.module_loading.import_string`` instead.
  131. * ``Product.variants``: Use ``Product.children``
  132. * ``Product.is_top_level``: Use ``Product.is_standalone or self.is_parent``
  133. * ``Product.is_group``: Use ``Product.is_parent``
  134. * ``Product.is_variant``: Use ``Product.is_child``
  135. * ``Product.min_variant_price_incl_tax``: Refactor or use the deprecated
  136. ``Product.min_child_price_incl_tax``.
  137. * ``Product.min_variant_price_excl_tax``: Refactor or use the deprecated
  138. ``Product.min_child_price_excl_tax``.
  139. * ``Strategy.fetch_for_group``: Use ``Strategy.fetch_for_parent``.
  140. * ``Strategy.select_variant_stockrecords``: Use
  141. ``Strategy.select_children_stockrecords``.
  142. * ``Strategy.group_pricing_policy``: Use ``Strategy.parent_pricing_policy``.
  143. * ``Strategy.group_availability_policy``: Use
  144. ``Strategy.parent_availability_policy``.
  145. These classes have been removed:
  146. These instances have been removed:
  147. * ``oscar.app.shop``: Use ``oscar.app.application`` instead.