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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. .. _new_in_1.1:
  16. What's new in Oscar 1.1?
  17. ------------------------
  18. * The frontend templates have been updated to use Bootstrap 3 instead of version 2 (`#1576`_)
  19. * Category slug, name and URL handling has been refactored to make it easier to
  20. translate categories, and to be able to edit slugs independent of names.
  21. * The icon and caption of `django-tables2` tables can be set directly on the `Table` object, if it
  22. derives from :class:`~oscar.apps.dashboard.tables.DashboardTable`. The caption can be localized
  23. in singular and plural. (`#1482`_)
  24. * All modelforms now specify the `fields` meta attribute instead of the `excludes` list.
  25. * Product class options and attributes can now be edited in the dashboard.
  26. .. _`#1576`: https://github.com/django-oscar/django-oscar/pull/1576
  27. .. _`#1482`: https://github.com/django-oscar/django-oscar/pull/1482
  28. .. _minor_changes_in_1.1:
  29. Minor changes
  30. ~~~~~~~~~~~~~
  31. - The `Order.date_placed` field can now be set explicitly rather than using the
  32. `auto_now_add` behaviour (`#1558`_).
  33. - The settings ``OSCAR_BASKET_COOKIE_SECURE`` and ``OSCAR_RECENTLY_VIEWED_COOKIE_SECURE``
  34. are introduced to set the ``secure`` flag on the relevant cookies.
  35. - Previously, all views handled in Oscar's Application class were decorated
  36. with the permissions_required decorator. That decorator would not do
  37. anything if used with an empty set of permissions. But it was raised as an
  38. issue, and now views not requiring permissions are not decorated at all.
  39. - Properly redirect users to the checkout page after a guest user created an
  40. account.
  41. - ``OSCAR_SEARCH_FACETS`` now accepts ordered dicts.
  42. .. _`#1558`: https://github.com/django-oscar/django-oscar/pull/1558
  43. .. _incompatible_changes_in_1.1:
  44. Backwards incompatible changes in 1.1
  45. -------------------------------------
  46. Categories refactor
  47. ~~~~~~~~~~~~~~~~~~~
  48. The Category model contained two denormalisations to improve performance: it
  49. stored the name of the category and it's ancestors in ``full_name``, and the
  50. ``slug`` field did not just contain the category's slug, but also the ones of
  51. it's ancestors.
  52. This came with several drawbacks: it was fiddly to move and update categories,
  53. as one had to ensure to update parts of the entire category tree. It also
  54. made it trickier to add model-level translation to categories.
  55. A refactoring removed the denormalisations leading to much simpler logic,
  56. and a light sprinkle of caching for the URLs hopefully leads to a performance
  57. net positive. But unfortunately it did come with some changes:
  58. * Category slug handling is changed. Historically, Oscar always updated the
  59. slug when the name changed. Now a slug is only created if no slug is given,
  60. and an existing slug is never overridden. This means that you can freely
  61. change the slugs, and a name change will not change the category's URL.
  62. * The ``full_name`` field has been *removed* and been replaced by a
  63. ``full_name`` property. Accessing that property incurs one database query to
  64. fetch the ancestors.
  65. * ``Category.get_absolute_url`` is now naively cached, as it's more costly to
  66. generate the URL than before. But as ``ProductCategoryView``, the view
  67. returned in ``get_absolute_url`` only considers the primary key and not the
  68. slug, even a stale cache should lead to the correct category page. But if
  69. you have altered that logic, please be sure to investigate.
  70. Those changes unfortunately do mean a data migration to update the slugs
  71. which *must* be run. Please see the section on migrations below. Please also
  72. ensure that, if you load your categories via fixtures, you update them
  73. accordingly: remove the ``full_name`` field and remove the ancestor's slugs
  74. from the ``slug`` field.
  75. Misc
  76. ~~~~
  77. * The :class:`~oscar.apps.shipping.abstract_models.AbstractWeightBased` shipping
  78. method now allows zero-weight baskets to have a non-zero shipping cost
  79. (`#1565`_). This means that sites that rely on zero-weight baskets having no
  80. change will need to introduce a new weight band that covers this edge case.
  81. * The methods :method:`~oscar.apps.offer.utils.Applicator.apply` and
  82. :method:`~oscar.apps.offer.utils.Applicatior.get_offers` changed their
  83. arguments to `(basket, user=None, request=None)`. (`#1677`_)
  84. .. _`#1565`: https://github.com/django-oscar/django-oscar/pull/1565
  85. .. _`#1677`: https://github.com/django-oscar/django-oscar/pull/1677
  86. Migrations
  87. ~~~~~~~~~~
  88. Migrations will get picked up automatically for apps you haven't customised.
  89. If you have customised any app, please consult the
  90. `detailed instructions <topics/upgrading>`_ on how to handle migrations.
  91. .. warning::
  92. This release contains a data migration for category slugs. If you have
  93. forked it, it is critical you run a copy of that migration when upgrading.
  94. Catalogue
  95. * This app contains model changes.
  96. * This app contains a data migration: ``0003_data_migration_slugs``.
  97. It shouldn't matter whether you apply this migration before or after
  98. the model changes.
  99. Dependency changes
  100. ------------------
  101. * Oscar now requires `django-treebeard` 3.0.
  102. .. _deprecated_features_in_1.1:
  103. Deprecated features
  104. ~~~~~~~~~~~~~~~~~~~
  105. The following features have been deprecated in this release:
  106. * For backwards compatibility, one can access the ``ProductCategoryView``
  107. without specifying a category PK in the URL. Oscar itself does not
  108. use this any more, and it will be removed with the next version of Oscar.
  109. Removal of deprecated features
  110. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111. These methods have been removed:
  112. These classes have been removed: