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.7.rst 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. ===========================================
  2. Oscar 0.7 release notes - UNDER DEVELOPMENT
  3. ===========================================
  4. Welcome to Oscar 0.7!
  5. Table of contents:
  6. .. contents::
  7. :local:
  8. :depth: 1
  9. Compatibility
  10. =============
  11. Oscar 0.7 has experimental support for Python 3. Support for Django 1.4 has
  12. been dropped, and support for Django 1.6 is considered stable.
  13. What's new in Oscar 0.7?
  14. ========================
  15. This release is mostly a maintenance release, fixing a lot of bugs and and doing
  16. a lot of housekeeping. We have removed a few unused models and fields, and
  17. removed ``null=True`` on a lot of ``CharFields`` - so please read the
  18. release notes carefully when upgrading!
  19. Search improvements
  20. ~~~~~~~~~~~~~~~~~~~
  21. * Search results can be now be sorted
  22. * If you're search backend supports it, spelling suggestions will be shown if
  23. the search term doesn't lead to any results.
  24. * Only products are returned by the core search view. Other content types in
  25. your search index are filtered out (`#370`_).
  26. .. _`#370`: https://github.com/tangentlabs/django-oscar/issues/370
  27. Improvements to signals
  28. ~~~~~~~~~~~~~~~~~~~~~~~
  29. Oscar signals have been improved and consolidated, making it easier to hook
  30. into user journeys and extract analytics.
  31. Changes to existing signals:
  32. - The :ref:`basket_addition_signal` signal now passes the ``request`` as an additional
  33. kwarg.
  34. - The :ref:`user_registered_signal` signal now passes the ``request`` as an additional
  35. kwarg.
  36. New signals:
  37. - A :ref:`start_checkout_signal` signal is now raised when the customer begins the
  38. checkout process.
  39. See the :doc:`signals docs </ref/signals>` for more details.
  40. Minor changes
  41. ~~~~~~~~~~~~~
  42. * Customers can delete their profiles from within the account section.
  43. * :attr:`~oscar.core.application.Application.permissions_map` now supports more than two
  44. lists to evaluate permissions.
  45. * Formset handling in
  46. :class:`~oscar.apps.dashboard.catalogue.views.ProductCreateUpdateView` has
  47. been simplified and now easily allows adding further formsets.
  48. * Increased required version of Django Haystack to 2.1
  49. * The dashboard's Bootstrap and the Bootstrap JS has been bumped to 2.3.2, the
  50. latest release of version 2.
  51. * The dashboard's category handling now has the ability to directly create
  52. child categories.
  53. * Oscar's error messages now have their own CSS class, ``error-block``
  54. (`ef3ccf08a7`_).
  55. * It is now possible to disable the redirect that happens when a product or
  56. category's slug changed and an old URL is used (`b920f8ba`_).
  57. * :class:`~oscar.apps.payment.forms.BankCardNumberField` now allows specifying
  58. accepted card types (`32b7249`_).
  59. * Several slug fields have been turned into the newly introduced
  60. :class:`~oscar.models.fields.AutoSlugField` to ensure that generated slugs
  61. are unique.
  62. * Widget initialisation can now be prevented with adding the ``no-widget-init``
  63. class. Issues around widget initialisation in the dashboard promotions have
  64. been resolved.
  65. * The access function used to determine dashboard's menu entries' visibility
  66. is now settable via
  67. :doc:`OSCAR_DASHBOARD_DEFAULT_ACCESS_FUNCTION</ref/settings>`.
  68. * Vouchers start and end times are now datetimes instead of dates; allowing
  69. "lunch-time deals" etc.
  70. * Product classes can now be added from the dashboard. Editing options and
  71. attributes is not yet supported though.
  72. * Experimental support for having a language prefix in the URL has been added,
  73. and enabled for the sandbox. This can be achieved by using Django's
  74. `i18n_patterns`_ function in your ``urls.py``. for the sandbox.
  75. See ``sites/sandbox/urls.py`` for an example.
  76. * A basic example for a multi-language sitemap has been added to the sandbox.
  77. .. _`b920f8ba`: https://github.com/tangentlabs/django-oscar/commit/b920f8ba288cd2f19bb167db2a012479ba956397
  78. .. _`ef3ccf08a7`: https://github.com/tangentlabs/django-oscar/commit/ef3ccf08a707ae1250cdb8d5f2dc6f721d020dc4
  79. .. _`32b7249`: https://github.com/tangentlabs/django-oscar/commit/32b7249e44b40cb1b20d01226f77ae6777a20b91
  80. .. _`i18n_patterns`: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#language-prefix-in-url-patterns
  81. Bugfixes
  82. ~~~~~~~~
  83. * Addresses in non-shipping countries can't be selected as default shipping
  84. address anymore (`be04d46639`_).
  85. * Suspended and consumed offers are no longer returned by the "active" offer
  86. manager. (`#1228`_).
  87. .. _`#1228`: https://github.com/tangentlabs/django-oscar/issues/1228
  88. .. _`be04d46639`: https://github.com/tangentlabs/django-oscar/commit/
  89. Backwards incompatible changes in 0.7
  90. =====================================
  91. .. warning::
  92. Fields and models have been removed from Oscar. If you used them, you must
  93. ensure you create/extend the affected models appropriately.
  94. * Oscar has dropped support for Django 1.4. However, if Oscar continues to
  95. support the ``AUTH_PROFILE_MODULE`` setting so sites that use separate
  96. profile models aren't forced to convert to a single user model in order to
  97. use Oscar 0.7.
  98. * ``AbstractProduct.status`` was an unused ``CharField`` provided for convenience
  99. as it's a commonly required field. But a different field type was often
  100. required, and as changing it is much harder than adding a field with the
  101. desired type, the field has been removed.
  102. * ``Contributor``, ``ContributorRole``, the through-model ``ProductContributor``
  103. and their abstract versions have been removed as they were unused and too
  104. specific to the domain of book shops.
  105. * ``ProductCategory.is_canonical`` was an unused ``BooleanField`` and has been
  106. removed.
  107. * ``Order.basket_id`` was a ``PositiveIntegerField`` containing the primary key of the
  108. associated basket. It's been refactored to be a nullable ``ForeignKey`` and
  109. is now called "basket".
  110. * `#1123`_ - The URL structure of ``ProductCreateRedirectView`` has been changed to use
  111. the product class' slug instead of the primary key. It's necessary to update
  112. URLs pointing to that view.
  113. * ``ProductListView`` has been removed as it wasn't needed any more after the
  114. search improvements. The old URL route still works.
  115. * Accessing categories by just slug instead of primary key and slug had been
  116. unofficially deprecated for 0.6, and is removed now.
  117. * `#1251`_ - Form related templates have been refactored. If you've modified
  118. them, your templates might need updating.
  119. * ``django.conf.urls.i18n`` has been removed from Oscar's default URLs. This is
  120. because to get ``i18n_patterns`` working for Oscar, it needs to be defined
  121. outside of the scope of it. If you use i18n, you need to explicitly add the
  122. following line to your main ``urls.py``::
  123. (r'^i18n/', include('django.conf.urls.i18n')),
  124. .. _`#1123`: https://github.com/tangentlabs/django-oscar/pull/1123
  125. .. _`#1251`: https://github.com/tangentlabs/django-oscar/pull/1251
  126. Removal of features deprecated in 0.6
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. * Django 1.4 support has been removed.
  129. Renamed templates
  130. ~~~~~~~~~~~~~~~~~
  131. Template block changes
  132. ~~~~~~~~~~~~~~~~~~~~~~
  133. Migrations
  134. ~~~~~~~~~~
  135. .. warning::
  136. The reviews app has not been under migration control so far. Please ensure
  137. you follow South's guidelines on how to `convert an app`_. Essentially,
  138. you will have to run:
  139. $ ./manage.py migrate reviews 0001 --fake
  140. .. warning::
  141. A lot of Oscar apps have data migrations for CharFields before ``null=True``
  142. is removed in the following schema migration. If you have extended such an
  143. app and use your own migrations, then you will need to first convert
  144. affected ``None``'s to ``''`` yourself; see the data migrations for our
  145. approach.
  146. * Address:
  147. - ``0008`` - Forgotten migration for ``UserAddress.phone_number``
  148. - ``0009`` & ``0010`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  149. * Catalogue:
  150. - ``0014`` - Drops unused ``ProductCategory.is_canonical`` field.
  151. - ``0015`` - Turns a product's UPC field into a :class:`oscar.models.fields.NullCharField`
  152. - ``0016`` - ``AutoSlugField`` for ``AbstractProductClass`` and ``AbstractOption``
  153. - ``0017`` - Removes ``Product.status``, ``Contributor``, ``ContributorRole`` and ``ProductContributor``
  154. - ``0018`` - Set ``on_delete=models.PROTECT`` on ``Product.product_class``
  155. - ``0019`` & ``0020`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  156. * Customer:
  157. - ``0006`` - ``AutoSlugField`` and ``unique=True`` for ``AbstractCommunicationEventType``
  158. - ``0007`` & ``0008`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  159. * Offer:
  160. - ``0029`` - ``AutoSlugField`` for ``ConditionalOffer``
  161. - ``0030`` & ``0031`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  162. * Order:
  163. - ``0025`` - ``AutoSlugField`` for ``AbstractPaymentEventType`` and AbstractShippingEventType``
  164. - ``0026`` - Allow ``null=True`` and ``blank=True`` for ``Line.partner_name``
  165. - ``0027`` & ``0028`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  166. * Partner:
  167. - ``0011`` - ``AutoSlugField`` for ``AbstractPartner``
  168. - ``0012`` & ``0013`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  169. * Payment:
  170. - ``0003`` - ``AutoSlugField`` and ``unique=True`` for ``AbstractSourceType``
  171. * Promotions:
  172. - ``0004`` & ``0005`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  173. * Shipping:
  174. - ``0006`` - ``AutoSlugField`` for ``ShippingMethod``
  175. * Reviews:
  176. - ``0001`` - Initial migration for reviews application. Make sure to follow
  177. South's guidelines on how to `convert an app`_.
  178. - ``0002`` & ``0003`` - Data and schema migration for removing ``null=True`` on ``CharFields``
  179. * Voucher:
  180. - ``0002`` and ``0003`` - Convert ``[start|end]_date`` to
  181. ``[start|end]_datetime`` (includes data migration).
  182. .. _`convert an app`: http://south.readthedocs.org/en/latest/convertinganapp.html
  183. Features deprecated in 0.6
  184. ==========================