Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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