Clone wiki

satchmo / BackwardsIncompatibleChangesBefore0.5

Backwards-incompatible changes before 0.5

Table of Contents

  • June 26, 2007: [#MEDIA_URLrequirestrailingslash MEDIA_URL requires trailing slash]
  • July 1, 2007: [#Registrationmerge Registration merge]
  • July 4, 2007: [#Unicodemerge Unicode merge]
  • July 8, 2007: [#Discountmodelchanges Discount model changes]
  • July 13, 2007: [#Discountmodelchanges Discount model changes]
  • July 15, 2007: [#RemovedPhoneNumberuniqueconstraint Removed PhoneNumber unique constraint]
  • July 15, 2007: [#AddedCreditCardDetailuniqueconstraint Added CreditCardDetail unique constraint]
  • July 17, 2007: [#Productmodelrefactormerge Merged Product Model Refactor branch - Major model changes]
  • July 20, 2007: [#Productslugrename Renamed to Product.slug]
  • July 25, 2007: [#Optionunique_togetherconstraint Option unique_together constraint]
  • July 25, 2007: [#ProductImageunique_togetherconstraint ProductImage unique_together constraint]
  • July 27, 2007: [#Contactmodelnamestylechanges Contact model namestyle changes]
  • August 11, 2007: [#show_trackertagneedsis_secure show_tracker tag should now include is_secure]
  • August 11, 2007: [#i18nModelchangeforreg_area i18n Model change for reg_area]
  • August 11, 2007: [#ShopConfigModelChanges Config model name changes]
  • August 15, 2007: [#Productfull_namerename Renamed Product.full_name to]
  • August 16, 2007: [#Djangomanagementcallupdates Django management call updates]
  • August 17, 2007: [#RenamerelatedItemsandalsoPurchasedinProduct Rename relatedItems and alsoPurchased in Product]
  • August 20, 2007: [#ShopConfigInCountryOnly Added new fields to Shop Config]

MEDIA_URL requires trailing slash

Before [451], MEDIA_URL could not have a trailing slash. Now it '''must''' have one. Note: [451] introduces a bug that isn't fixed in trunk until [464], or [471] for the product-model-refactor branch.

Registration merge

The registration branch was merged into trunk in [475]. This branch reorganized most of the files related to registration, which caused a few incompatibilities.

  • In AUTHENTICATION_BACKENDS in your settings file, '!EmailBackend' should now be '!EmailBackend'.
  • You should include 'satchmo.accounts.urls' in your urlconf. This is done by default in Satchmo's root urlconf.
  • The names of many URLs have been changed.

You'll need to clear the django_session table, or else logged-in users will get !ImproperlyConfigured errors.

Unicode merge

As of [489], Satchmo requires [ Django revision 5609] or later.

Discount model changes

July 8: [503] added some new functionality to the discount models. You'll need to make two changes to the discount_discount table in your database:

  • freeShipping can now be NULL
  • Add includeShipping, a boolean column that can be NULL

July 13: [520] made another change to the discount_discount table:

  • Each code must now be unique.

Removed !PhoneNumber unique constraint

As of [531], there is no longer a unique_together constraint on !PhoneNumber's contact and primary fields.

Added !CreditCardDetail unique constraint

As of [533], there is a unique constraint on !CreditCardDetail's !ForeignKey to Order.

Product model refactor merge

In [543], the product-model-refactor branch was merged into trunk. If you were using this branch, you'll need to begin using trunk instead, as the branch won't be updated any longer. You can switch to trunk using svn switch svn://

There were many significant changes in this merge:

Model Changes

  • Item and !SubItem models have been merged into Product model
  • Item.short_name ->
  • Item.verbose_name -> Product.full_name
  • Added Product.short_description
  • Item.base_price removed (use Price model)
  • Item.option_group -> !ConfigurableProduct
  • Item.create_subs -> !ConfigurableProduct
  • !ItemImage model renamed to !ProductImage
  • !ItemImage.item -> !ProductImage.product
  • Price.subitem -> Price.product
  • !OptionItem model renamed to Option
  • Category.item -> Category.product
  • !CartItem.item -> !CartItem.product


  • Added PRODUCT_TYPES to
  • Changed format of image filenames (from productimage-picture-<id>.jpg to productimage-picture-<>.jpg - These will probably be renamed transparently, but be aware.
  • Removed product/<item_name>/<subitem_name> url pattern, just use product/<product_name> for the ProductVariation Product.

Product slug rename

In [555], was renamed to Product.slug for consistency with the Category model. Product.full_name will be renamed to after some reasonable time passes to find any leftover references to the old field. See the [ satchmo-users thread] for discussion.

Option unique_together constraint

In [565], a unique_together constraint was added to the product_option table for the optionGroup and value columns.

!ProductImage unique_together constraint

In [567], a unique_together constraint was added to the product_productimage table for the product and sort to allow '%s-%s'%(product.slug, sort) to be used as a unique filename.

Contact model namestyle changes

In [575], the contact model field and attribute names were normalized. They now all use underscored names instead of mixed-case names.

  • contact_order table:
  • postalCode -> postal_code
  • (ship/bill)Street1 -> (ship/bill)_street1
  • *Street2, *City, *State, *!PostalCode, *Country -> *_street2, *_city, *_state, *_postal_code, *_country
  • shippingDescription, shippingMethod, shippingCost -> shipping_description, shipping_method, shipping_cost
  • timeStamp -> timestamp
  • Contact model attributes:
  • copyAddresses, removeAllItems, CC, fullBillStreet, fullShipStreet -> copy_addresses, remove_all_items, credit_card, full_bill_street, full_ship_street
  • contact_orderitem table:
  • unitPrice, lineItemPrice -> unit_price, line_item_price
  • contact_orderstatus table:
  • timeStamp -> timestamp

show_tracker tag needs is_secure

In [636] the {%show_tracker%} tag was updated to work better with SSL, but any templates that refer to it must be changed to {%show_tracker is_secure%} to allow this to work. See [ this mailing list discussion] for more details.

i18n Model change for reg_area

  • In [639] updated reg_area to have max_length of 2

Shop Config Model Changes

  • In [644], chris made the following changes to /shop/
  • storeEmail -> store_email
  • storeName -> store_name
  • storeDescription -> store_description
  • postalCode -> postal_code
  • noStockCheckout -> no_stock_checkout

Product full_name rename

In [648], Product.full_name was renamed to This is the continuation of the [#Productslugrename Product slug rename].

Django management call updates

As of [654] and [655], Satchmo requires [ Django revision 5905] or later.

Rename relatedItems and alsoPurchased in Product

In [658] product.relatedItems has been renamed to product.related_items and product.alsoPurchased has been renamed to product.also_purchased

Shop Config In Country Only

In [665] added two new fields to shop config, 'in_country_only' and 'sales_country', moving the latter from local_settings DEFAULT_COUNTRY.

Use this SQL to update your tables:

alter table shop_config add `in_country_only` bool NOT NULL;
alter table shop_config add `sales_country_id` varchar(3) NULL REFERENCES `i18n_country` (`iso3_code`);