|
|
@@ -25,7 +25,7 @@ Overview
|
|
25
|
25
|
|
|
26
|
26
|
The biggest change in Oscar 0.6 is the reworking of `pricing and availability`_, which
|
|
27
|
27
|
builds on top of the change to allow `multiple stockrecords per product`_. The
|
|
28
|
|
-charge is largely backwards compatible with the old system of "partner
|
|
|
28
|
+change is largely backwards compatible with the old system of "partner
|
|
29
|
29
|
wrappers" but it is recommended to upgrade to the new system. Support for
|
|
30
|
30
|
partner wrappers will be removed for Oscar 0.7.
|
|
31
|
31
|
|
|
|
@@ -133,7 +133,7 @@ Oscar:
|
|
133
|
133
|
Payment models have abstract versions
|
|
134
|
134
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
135
|
135
|
|
|
136
|
|
-The :doc:`payment models </ref/apps/payment>` have been split into abstract- and
|
|
|
136
|
+The :doc:`payment models </ref/apps/payment>` have been split into abstract and
|
|
137
|
137
|
concrete versions. This brings them inline with other Oscar apps and allows
|
|
138
|
138
|
them to be customised.
|
|
139
|
139
|
|
|
|
@@ -272,7 +272,7 @@ Several changes have been made to the checkout classes.
|
|
272
|
272
|
|
|
273
|
273
|
* The ``handle_payment`` method in
|
|
274
|
274
|
:class:`~oscar.apps.checkout.views.PaymentDetailsView` now accepts a
|
|
275
|
|
- :class:`~oscar.core.prices.Price`` instance instead of a Decimal.
|
|
|
275
|
+ :class:`~oscar.core.prices.Price` instance instead of a Decimal.
|
|
276
|
276
|
|
|
277
|
277
|
Signature changes
|
|
278
|
278
|
~~~~~~~~~~~~~~~~~
|
|
|
@@ -285,12 +285,9 @@ Several classes and functions have had signature changes:
|
|
285
|
285
|
* The :class:`oscar.apps.customer.forms.EmailAuthenticationForm` form needs to
|
|
286
|
286
|
be instantated with a host name so prevent redirects to external sites.
|
|
287
|
287
|
|
|
288
|
|
-* The :class:`oscar.apps.customer.forms.EmailAuthenticationForm` form needs to
|
|
289
|
|
- be instantated with a host name so prevent redirects to external sites.
|
|
290
|
|
-
|
|
291
|
288
|
* The two product review forms, ``SignedInUserProductReviewForm`` and
|
|
292
|
289
|
``AnonymousUserProductReviewForm``, have been replaced by a new
|
|
293
|
|
- :class:`oscar.apps.catalogue.reviews.forms.ProductReviewForm``.
|
|
|
290
|
+ :class:`oscar.apps.catalogue.reviews.forms.ProductReviewForm`.
|
|
294
|
291
|
|
|
295
|
292
|
* 3 properties have been removed from
|
|
296
|
293
|
:class:`oscar.apps.catalogue.abstract_models.AbstractProductImage` as they
|
|
|
@@ -334,10 +331,10 @@ Basket model changes
|
|
334
|
331
|
Several properties of the basket ``Line`` model have been renamed:
|
|
335
|
332
|
|
|
336
|
333
|
* ``Line.line_price_excl_tax_and_discounts`` has been renamed to
|
|
337
|
|
- ``Line.line_price_exlc_tax_incl_discounts``.
|
|
|
334
|
+ ``Line.line_price_excl_tax_incl_discounts``.
|
|
338
|
335
|
|
|
339
|
336
|
* ``Line.line_price_incl_tax_and_discounts`` has been renamed to
|
|
340
|
|
- ``Line.line_price_inlc_tax_incl_discounts``.
|
|
|
337
|
+ ``Line.line_price_incl_tax_incl_discounts``.
|
|
341
|
338
|
|
|
342
|
339
|
Address model changes
|
|
343
|
340
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
@@ -456,7 +453,7 @@ The permission-based dashboard introduced a new permission:
|
|
456
|
453
|
Upgrading notes
|
|
457
|
454
|
===============
|
|
458
|
455
|
|
|
459
|
|
-* Alternative product class templates now use ``slug` field instead of
|
|
|
456
|
+* Alternative product class templates now use ``slug`` field instead of
|
|
460
|
457
|
``name.lower()`` to determine their filename. If you have templates for
|
|
461
|
458
|
specific product classes, please update your filenames accordingly
|
|
462
|
459
|
|
|
|
@@ -473,7 +470,7 @@ Checkout app:
|
|
473
|
470
|
|
|
474
|
471
|
Payment app:
|
|
475
|
472
|
|
|
476
|
|
-* The `balance` method on the source object is not a property not a method.
|
|
|
473
|
+* The `balance` method on the source object is now a property not a method.
|
|
477
|
474
|
|
|
478
|
475
|
URLs
|
|
479
|
476
|
~~~~
|
|
|
@@ -591,7 +588,7 @@ are deprecated and will be removed for Oscar 0.7.
|
|
591
|
588
|
|
|
592
|
589
|
All the above properties and methods have effectively been moved to the availability and pricing
|
|
593
|
590
|
policies that a strategy class is responsible for loading. To upgrade your
|
|
594
|
|
-codebase, replcae your partner wrapper classes with equivalent
|
|
|
591
|
+codebase, replace your partner wrapper classes with equivalent
|
|
595
|
592
|
:doc:`availability and pricing policies </topics/prices_and_availability>`.
|
|
596
|
593
|
|
|
597
|
594
|
Basket
|
|
|
@@ -612,11 +609,11 @@ calculate correctly:
|
|
612
|
609
|
basket = models.Basket.objects.get(id=1)
|
|
613
|
610
|
basket.strategy = request.strategy
|
|
614
|
611
|
|
|
615
|
|
-With an assigned strategy class, a basket will raise a ``RuntimeError`` when
|
|
|
612
|
+Without an assigned strategy class, a basket will raise a ``RuntimeError`` when
|
|
616
|
613
|
attempting to calculate totals.
|
|
617
|
614
|
|
|
618
|
615
|
The way a product is added to a basket has also been changed as a ``StockInfo``
|
|
619
|
|
-instance is also required.
|
|
|
616
|
+instance is also required.
|
|
620
|
617
|
|
|
621
|
618
|
.. code-block:: python
|
|
622
|
619
|
|