|
@@ -81,6 +81,17 @@ has been altered to be:
|
81
|
81
|
Some properties and method names have also been updated to the new naming. The
|
82
|
82
|
old ones will throw a deprecation warning.
|
83
|
83
|
|
|
84
|
+Django 1.7 support
|
|
85
|
+------------------
|
|
86
|
+
|
|
87
|
+Oscar 0.8 comes with support for Django 1.7 out of the box. The app refactor
|
|
88
|
+and the new migration framework are both great improvements to Django. Oscar
|
|
89
|
+now ships with sets of migrations both for South and the new native
|
|
90
|
+migrations framework.
|
|
91
|
+Unfortunately, the changes in Django required a few breaking changes when
|
|
92
|
+upgrading Oscar both for users staying on Django 1.6 and for users upgrading to
|
|
93
|
+Django 1.7 at the same time.
|
|
94
|
+
|
84
|
95
|
Reworked shipping app
|
85
|
96
|
~~~~~~~~~~~~~~~~~~~~~
|
86
|
97
|
|
|
@@ -205,12 +216,44 @@ Minor changes
|
205
|
216
|
populate the country databases. It replaces the ``countries.json`` fixture.
|
206
|
217
|
The command relies on the ``pycountry`` library being installed.
|
207
|
218
|
|
|
219
|
+* It is now possible to use product attributes to add a relation to arbitrary
|
|
220
|
+ model instances. There was some (presumably broken) support for it before,
|
|
221
|
+ but you should now be able to use product attributes of type ``entity`` as
|
|
222
|
+ expected. There's currently no frontend or dashboard support for it, as there
|
|
223
|
+ is no good default behaviour.
|
|
224
|
+
|
208
|
225
|
.. _incompatible_changes_in_0.8:
|
209
|
226
|
|
210
|
227
|
Backwards incompatible changes in 0.8
|
211
|
228
|
-------------------------------------
|
212
|
229
|
|
213
|
|
-.. _incompatible_shipping_changes_in_0.8:
|
|
230
|
+Migrations
|
|
231
|
+~~~~~~~~~~
|
|
232
|
+
|
|
233
|
+* South is not a dependency of Oscar anymore: This means it won't get installed
|
|
234
|
+ automatically when you install Oscar. If you are on Django 1.6 and want to
|
|
235
|
+ use South, you will need to explicitly install it and add it to your
|
|
236
|
+ requirements.
|
|
237
|
+* Only South >= 1.0 is supported: South 1.0 is a backwards compatible release
|
|
238
|
+ explicitly released to help with the upgrade path to Django 1.7. Please make
|
|
239
|
+ sure you update accordingly if you intend to keep using South. Older versions
|
|
240
|
+ of South will look in the wrong directories and will break with this Oscar
|
|
241
|
+ release.
|
|
242
|
+* Rename your South ``migrations`` directories: To avoid
|
|
243
|
+ clashes between Django's migrations and South's migrations, you should rename
|
|
244
|
+ all your South migrations directories (including those of forked Oscar apps)
|
|
245
|
+ to ``south_migrations``. South 1.0 will check those first before falling back
|
|
246
|
+ to ``migrations``.
|
|
247
|
+* Upgrading to new-style migrations: If you're upgrading to Django 1.7, you
|
|
248
|
+ will need to follow the `instructions to upgrade from South`_ for your own
|
|
249
|
+ apps. For any forked Oscar apps, you will need to copy Oscar's initial
|
|
250
|
+ migrations into your emptied ``migrations`` directory first, because Oscar's
|
|
251
|
+ set of migrations depend on each other. You can then create migrations for
|
|
252
|
+ your changes by calling ``./manage.py makemigrations``. Django should
|
|
253
|
+ detect that the database layout already matches the state of migrations; so
|
|
254
|
+ a call to ``migrate`` should fake the migrations.
|
|
255
|
+
|
|
256
|
+.. _instructions to upgrade from South: https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south
|
214
|
257
|
|
215
|
258
|
Product structure
|
216
|
259
|
~~~~~~~~~~~~~~~~~
|
|
@@ -237,6 +280,8 @@ The following methods and properties have been deprecated:
|
237
|
280
|
* ``Strategy.select_variant_stockrecords`` - Use
|
238
|
281
|
``select_children_stockrecords`` instead.
|
239
|
282
|
|
|
283
|
+.. _incompatible_shipping_changes_in_0.8:
|
|
284
|
+
|
240
|
285
|
Shipping
|
241
|
286
|
~~~~~~~~
|
242
|
287
|
|
|
@@ -378,11 +423,11 @@ Misc
|
378
|
423
|
trivial ``ProductAttribute.get_validator`` and the unused
|
379
|
424
|
``ProductAttribute.is_value_valid`` methods have been removed.
|
380
|
425
|
|
381
|
|
-* It is now possible to use product attributes to add a relation to arbitrary
|
382
|
|
- model instances. There was some (presumably broken) support for it before,
|
383
|
|
- but you should now be able to use product attributes of type ``entity`` as
|
384
|
|
- expected. There's currently no frontend or dashboard support for it, as there
|
385
|
|
- is no good default behaviour.
|
|
426
|
+* The ``RangeProductFileUpload`` model has been moved from the ranges
|
|
427
|
+ dashboard app to the offers app. The migrations that have been naively
|
|
428
|
+ drop and re-create the model; any data is lost! This is probably not an
|
|
429
|
+ issue, as the model is only used while an range upload is in progress. If
|
|
430
|
+ you need to keep the data, ensure you migrate it across.
|
386
|
431
|
|
387
|
432
|
.. _rewritten: https://github.com/tangentlabs/django-oscar/commit/d8b4dbfed17be90846ea4bc47b5f7b39ad944c24
|
388
|
433
|
|
|
@@ -451,13 +496,11 @@ Migrations
|
451
|
496
|
Please double-check it's outcome and make sure to do something similar
|
452
|
497
|
if you have forked the catalogue app.
|
453
|
498
|
|
454
|
|
-.. warning::
|
|
499
|
+.. note::
|
455
|
500
|
|
456
|
|
- The ``RangeProductFileUpload`` model has been moved from the ranges
|
457
|
|
- dashboard app to the offers app. The migrations that have been naively
|
458
|
|
- drop and re-create the model; any data is lost! This is probably not an
|
459
|
|
- issue, as the model is only used while an range upload is in progress. If
|
460
|
|
- you need to keep the data, ensure you migrate it across.
|
|
501
|
+ The migration numbers below refer to the numbers of the South migrations.
|
|
502
|
+ Oscar 0.8 ships with a set of new initial migrations for Django's new
|
|
503
|
+ native migrations framework. They include all the changes detailed below.
|
461
|
504
|
|
462
|
505
|
.. note::
|
463
|
506
|
|