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.

v3.0.rst 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ========================================
  2. Oscar 3.0 release notes (in development)
  3. ========================================
  4. :release: TBD
  5. Welcome to Oscar 3.0!
  6. .. contents::
  7. :local:
  8. :depth: 1
  9. .. _compatibility_of_3.0:
  10. Compatibility
  11. ~~~~~~~~~~~~~
  12. .. _new_in_3.0:
  13. What's new in Oscar 3.0?
  14. ~~~~~~~~~~~~~~~~~~~~~~~~
  15. - Oscar 3.0 features a major upgrade of Oscar's default templates and styles to use Bootstrap version 4.
  16. Both the front-end and dashboard templates have been refactored to work with Bootstrap 4. This is a major,
  17. non-backward compatible change for projects that rely on or extend the default Oscar templates.
  18. - As with Bootstrap 4 itself, Oscar's default styles are now defined using SASS instead of LESS.
  19. - To replace Bootstrap 3's Glyphicons, Oscar's default templates now rely on Font Awesome.
  20. - Support has been added to the ``catalogue.Option`` model to define the
  21. type of option. This is used by the ``AddToBasketForm`` to determine the appropriate form field to display for that
  22. option in the add-to-cart form. Currently supported types are: text, integer, float, boolean, and date.
  23. The ``type`` field on the ``Option`` model (previously used to denote whether the option is required)
  24. has been repurposed to store the type of the option, and a new ``required`` field
  25. has been added to denote whether the option is required. Projects that have forked the catalogue app will
  26. need to generate custom migrations for these model field changes.
  27. Projects should pay close attention to the data migration provided in
  28. ``catalogue/migrations/0019_option_required.py`` for this change.
  29. - Added support for restricted combinations of offers. When creating an offer in the dashboard,
  30. administrators can now define a restricted set of other offers that offer can be used in combination with.
  31. This changes introduces a new ``combinations`` field on the ``Offer`` model which requires a database migration.
  32. - Report generator classes now can define ``model_class`` or ``queryset``, similar to Django class based views.
  33. You can also override queryset in the ``get_queryset`` method. Filtering by date range is now properly applied
  34. during CSV export as well.
  35. - New fields ``meta_title`` and ``meta_description`` have been added to both the ``Product`` and ``Category`` models,
  36. which can be used to override the HTML title and meta description content for product and category pages. These
  37. are editable from the search engine optimisation tab in the dashboard edit views for products and categories
  38. respectively. A database migration is required for this change.
  39. Backwards incompatible changes
  40. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41. - The ``StockRecord.price_excl_tax`` field has been renamed to ``StockRecord.price``.
  42. Projects that have forked the ``partner`` app will need to generate their own migration
  43. to rename this field.
  44. - The ``annotate_form_field`` template tag will now set the ``widget_type`` in `the format of Django 3.1`_: so no longer
  45. ``CheckboxField``, but just ``checkbox``.
  46. .. _`the format of Django 3.1`: https://docs.djangoproject.com/en/3.1/ref/forms/api/#django.forms.BoundField.widget_type
  47. Bug fixes
  48. ~~~~~~~~~
  49. - ``catalogue.product_attributes.ProductAttributesContainer`` was refactored to ensure that attributes
  50. inside the container are always properly loaded at initialisation. The container is now wrapped in a
  51. ``SimpleLazyObject`` when assigned to ``Product.attr``. ``ProductAttributesContainer.initiate_attributes()``
  52. was removed as the database query now happens on instantiation.
  53. Removal of deprecated features
  54. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. - Several deprecated model fields have been removed in Oscar 3.0:
  56. - ``order.Line.est_dispatch_date``
  57. - ``order.Line.unit_cost_price``
  58. - ``order.Line.unit_retail_price``
  59. - ``partner.StockRecord.cost_price``
  60. - ``partner.StockRecord.price_retail``
  61. Oscar ships with migrations that remove these fields. If you want to continue using them,
  62. please make sure you add the fields back to your forked app before migrating. Projects
  63. that have forked the ``order`` and ``partner`` apps will need to generate their own
  64. migrations to remove these fields.
  65. Minor changes
  66. ~~~~~~~~~~~~~
  67. - Several models were updated to define a default ordering, to avoid issues with inconsistent ordering of
  68. items in the dashboard and elsewhere. Database migrations are required for these changes.
  69. - Category slugs can now be edited via the dashboard.
  70. - A new method ``get_attribute_values()`` was added to the Product model which returns a merged set of
  71. attribute values for child and parent products.
  72. - The behaviour of ``checkout.views.ThankYouView`` when no order is found in the session has changed,
  73. to redirect the user to the URL defined by ``settings.OSCAR_HOMEPAGE`` instead of returning a page not found error.
  74. Dependency changes
  75. ~~~~~~~~~~~~~~~~~~
  76. Python package dependencies:
  77. Javascript dependencies:
  78. .. _deprecated_features_in_2.0:
  79. Deprecated features
  80. ~~~~~~~~~~~~~~~~~~~