Clone wiki

satchmo / BackwardsIncompatibleChangesAfter0.5

Backwards-incompatible changes after 0.5

Backwards-incompatible changes after 0.5

Table of Contents

  • September 5, 2007: [#ProductRatings Added a new field to Shop Config]
  • September 9, 2007: [#L10nModelsreplacingi18n Replacing i18n with L10n models]
  • September 12, 2007: [#ProductOrderingField Added new Ordering field to product]
  • September 25, 2007: [#ConfigurationBranchMerge Local settings almost completely gutted]
  • September 25, 2007: [#OrderHistoryRefactor Added new payment history object]
  • September 26, 2007: [#RemovedNewsletterField Removed Newsletter field from Contact]
  • October 24, 2007: [#ExpandedContactFields Expanded Contact Fields]

Product Ratings

In [692], the enable_ratings field was added to the shop config model.

Use this SQL to update your tables:

ALTER TABLE shop_config ADD enable_ratings BOOLEAN DEFAULT TRUE;

You also need to add django.contrib.comments and comment_utils to your INSTALLED_APPS setting, and make sure that comment_utils is installed properly. comment_utils is available from [http://code.google.com/p/django-comment-utils/].

L10n Models replacing i18n

In [702], we moved to using l10n models instead of i18n models for data. For most users developing a store, this should be a pretty simple syncdb to install new models. For those people with existing stores and data, the conversion is a little tricker. It might be easier to have both sets of data in place for now.

You should add 'satchmo.l10n' to your settings file, and remove 'satchmo.i18n' unless you have a special need for it.

Product Ordering Field

In [707], we added a new 'ordering' field to Product, to allow fine tuning what order the products are displayed to the customer.

alter table product_product add ordering integer default '0';

Configuration Branch Merge

In [758] we removed almost all custom settings from local_settings.py, and added a new system to handle site-specific settings. You must manually move these settings if upgrading an existing site. Go to your admin page and click on "Edit Shop Options."

Also, we now require a cache backend to be specified in your settings. Do not use locmem, it will not work properly at all in production. Preferably use memcached, but file or DB is OK. File is faster, I don't know why you'd want to use db, personally. See: http://www.djangoproject.com/documentation/cache/ for help setting up your cache backend.

`Enable Ratings`, which was a column in the shop config table, is now managed via the same system.

You will need to add 'satchmo.caching' and 'satchmo.configuration' to your INSTALLED_APPS setting.

Order History Refactor

In [760] we added a new object to handle payment history, in prep for managing split-payments. CreditCardDetails are now children of the payment history object, which breaks backward compatibility, but is really necessary.

Removed Newsletter Field

In [770] and [771] made newsletter unlinked from Contact object. It is still managed by the Newsletter system, but that system should now be completely optional, with no direct hooks into the Contact object. Removed the column from contact_contact database table.

Expanded Contact Fields

In [845] some changes were made in the Contact models to accomodate larger state fields. You can alter your tables accordingly:

ALTER TABLE `contact_addressbook` CHANGE `state` `state` VARCHAR( 50 )
ALTER TABLE `contact_order` CHANGE `bill_state` `bill_state` VARCHAR( 50 )
ALTER TABLE `contact_order` CHANGE `ship_state` `ship_state` VARCHAR( 50 )    

Updated