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.

v0.5.rst 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. .. spelling::
  2. jQuery
  3. =======================
  4. Oscar 0.5 release notes
  5. =======================
  6. Welcome to Oscar 0.5!
  7. These release notes cover the `new features`_ as well as `upgrading advice`_.
  8. .. _`new features`: `What's new in Oscar 0.5?`_
  9. .. _`upgrading advice`: `Upgrading`_
  10. Overview
  11. ========
  12. The main aim of this release was to add functionality to offers but scope
  13. expanded over time to include many fixes and improvements. Whilst there aren't
  14. that many new features from a customer perspective, a great deal of work has
  15. gone into reworking Oscar's structure to be more extensible.
  16. Thanks to all the contributors who helped with this release.
  17. What's new in Oscar 0.5?
  18. ========================
  19. Offers++
  20. ~~~~~~~~
  21. Most of the new features in 0.5 are around offers.
  22. * It is now possible to create custom ranges, conditions and benefits that can
  23. be used to create flexible offers. These ranges are created as Python classes
  24. conforming to a set interface which are registered at compile time to make
  25. them available in the dashboard.
  26. * Offer benefits can now apply to the shipping charge for an order. Previously,
  27. all benefits were applied against the basket lines. There are three shipping
  28. benefits ready to use:
  29. - Fixed discount off shipping (e.g., get £5 off your shipping costs)
  30. - Percentage discount off shipping (e.g., get 25% off your shipping costs)
  31. - Fixed price shipping (e.g., your shipping charge will be £5)
  32. * Offer benefits can now be deferred. That is, they don't affect either the
  33. basket lines nor the shipping charge. This is useful for creating benefits
  34. such as awarding loyalty points.
  35. * Several new ways of restricting an offer's availability have been introduced:
  36. - An offer's lifetime can now be controlled to the second rather to the day
  37. (i.e., the relevant model fields used ``datetime`` rather than ``date``). This makes
  38. it possibly to run offers for a small amount of time (e.g., for a single
  39. lunchtime).
  40. - An offer can be restricted to a max number of applications per
  41. *basket/order*. For example, an offer can configured so that it can
  42. only be used once in a single order.
  43. - An offer can be restricted to a max number of applications per *user*.
  44. - An offer can be restricted to a max number of *global* applications.
  45. - An offer can be restricted to give a maximum total discount. After this
  46. amount of discount has been awarded, the offer becomes unavailable.
  47. .. figure:: screenshots/0.5/offer-restrictions.png
  48. :scale: 50%
  49. The restrictions editing page for an offer within the dashboard.
  50. * Offers can now be suspended and reinstated.
  51. * The offers dashboard has been rewritten.
  52. * There is now an offers homepage that lists all active offers.
  53. New dashboard skin
  54. ~~~~~~~~~~~~~~~~~~
  55. The design of the dashboard has been reworked, offering a better user experience
  56. throughout the dashboard. This work is still ongoing, further improvements in
  57. how the dashboard pages are laid out will appear in 0.6.
  58. .. figure:: screenshots/0.5/dashboard-nav.png
  59. The new dashboard navigation.
  60. Internationalisation
  61. ~~~~~~~~~~~~~~~~~~~~
  62. Oscar now uses Transifex_ to manage its translation files. Since 0.4, a
  63. considerable number of new languages are now supported (although many have
  64. partial coverage).
  65. .. _Transifex: https://www.transifex.com/projects/p/django-oscar/
  66. .. figure:: screenshots/0.5/transifex.png
  67. :scale: 80%
  68. A snippet from the Oscar Transifex page.
  69. Oscar's default templates also now support a simple language picker.
  70. New settings have been introduced to control how slugs are generated. By
  71. default, the `Unidecode <https://pypi.org/project/Unidecode/>`_ package is used to gracefully handle non-ASCII chars in
  72. slugs.
  73. Minor features
  74. ~~~~~~~~~~~~~~
  75. There are several noteworthy smaller improvements
  76. * The basket page now updates using AJAX rather than page reloads.
  77. * Oscar's documentation has been reorganised and improved. This is part of an
  78. ongoing effort to improve it. Watch this space.
  79. * Oscar's template now use django-compressor_ to compress CSS and JS assets.
  80. * Products can now be deleted using the catalogue dashboard.
  81. * Warnings emails are sent to customers when their password or email address is
  82. changed.
  83. * Flash messages can now contain HTML.
  84. .. _django-compressor: https://django-compressor.readthedocs.io/en/latest/
  85. Minor improvements
  86. ~~~~~~~~~~~~~~~~~~
  87. Several improvements have been made to ease development of Oscar (and Oscar
  88. projects):
  89. * The sandbox can be configured to compile the LESS files directly. This is
  90. useful for developing Oscar's CSS/LESS files.
  91. * A new management command ``oscar_fork_statics`` has been added to help with
  92. setting up static files for a new Oscar project.
  93. * Alternative templates can now be used for different product classes in product
  94. browsing views.
  95. * jQuery upgraded to 1.9.1
  96. * Bootstrap upgraded to 2.3.1
  97. * The test runner can now be run with tox_.
  98. * Oscar ships with profiling tools. There is a decorator and middleware
  99. available in ``oscar.profiling`` that can be used to help profile Oscar sites.
  100. * Customers are notified if changes to their basket lead to new offers being
  101. applied (or if previously applied offers are no longer available).
  102. .. figure:: screenshots/0.5/html_flash_msg.png
  103. A flash message indicating that the customer's basket has now qualified for
  104. a new offer.
  105. * Some testing utilities have been extracted into a new package,
  106. django-oscar-testsupport_, so they can be used by Oscar extensions.
  107. * A Vagrant_ manifest is provided for testing Oscar against different database
  108. vendors.
  109. * Oscar's Javascript has been rewritten to be cleaner and more extensible.
  110. * Coverage data is now submitted to coveralls.io_
  111. .. _coveralls.io: https://coveralls.io/r/django-oscar/django-oscar
  112. .. _django-oscar-testsupport: https://github.com/django-oscar/django-oscar-testsupport
  113. .. _tox: http://testrun.org/tox/latest/
  114. .. _Vagrant: http://www.vagrantup.com/
  115. Upgrading
  116. =========
  117. This section describes changes in core Oscar that you need to be aware of if you
  118. are upgrading from 0.4. See the :doc:`upgrading guidelines </topics/upgrading>`
  119. for further details on the steps you need to take.
  120. Migrations
  121. ~~~~~~~~~~
  122. There are new migrations in the following apps to be aware of.
  123. * Address:
  124. - ``0002``: Make ``postcode`` nullable on the ``Address`` model
  125. * Catalogue:
  126. - ``0009``: Add a ``rating`` field to the product model
  127. - ``0010``: Populate the new ``rating`` field
  128. .. note::
  129. Note, if you are using a customised version of the catalogue app, then you
  130. should create a similar data migration to ``0010`` in your own project.
  131. * Offer:
  132. - ``0007``: Add ``max_global_applications`` field to ``ConditionalOffer`` model
  133. - ``0008``: Add ``num_applications`` field to ``ConditionalOffer`` model
  134. - ``0009``: Rename ``max_applications`` field to ``max_basket_applications``
  135. - ``0010``: Add ``max_user_applications`` field to ``ConditionalOffer`` model
  136. - ``0011``: Add ``proxy_class`` field to ``Range`` model
  137. - ``0012``: Add ``proxy_class`` field to ``Condition`` model and make
  138. ``range``, ``type`` and ``value`` nullable.
  139. - ``0013``: Add unique index on ``proxy_class`` for the ``Range`` model
  140. - ``0014``: Empty migration after branch merge
  141. - ``0015``: Add ``max_discount`` field to ``ConditionalOffer`` model
  142. - ``0016``: Add ``status`` field to ``ConditionalOffer`` model
  143. - ``0017``: Change ``start_date`` and ``end_date`` to use ``datetime``.
  144. - ``0018``: Rename ``start_date`` and ``end_date`` to ``start_datetime`` and
  145. ``end_datetime`` respectively.
  146. - ``0019``: Add ``proxy_class`` field to ``Benefit`` model and make
  147. ``range``, ``type`` and ``value`` nullable.
  148. * Order:
  149. - ``0007``: Add ``frequency`` field to ``OrderDiscount`` model
  150. - ``0008``: Add ``category`` field to ``OrderDiscount`` model
  151. - ``0009``: Add ``message`` field to ``OrderDiscount`` model
  152. * Partner:
  153. - ``0004``: Add ``code`` field to ``Partner`` model
  154. - ``0005``: Populate the new ``code`` field
  155. - ``0006``: Add unique index on ``code`` field
  156. - ``0007``: Remove unique index from ``name`` field and make nullable
  157. .. note::
  158. Note, if you are using a customised version of the partner app, then you
  159. should create a similar data migration to ``0005`` in your own project.