stephenmcd/cartridge — pull request #57 by AlexHill (2012-08-30 05:05:09+00:00)
Title: Support for custom Product models

This is not intended to be merged immediately.

This adds support for subclassing `Product`, using the same strategy used in Mezzanine for subclassing `Page`:
* A `content_model` field and corresponding method `Product.get_content_model()` are added.
* `ProductAdmin.change_view()` is added which redirects to the subclass's change view.
* The product view looks for a template called "shop/products/*customproduct*.html", where *customproduct* is the lower-cased name of the `Product` subclass.

Things that need doing:
* tests
* the names of `content_model` and `get_content_model()` are taken directly from Mezzanine and don't really make sense here. I think they should either be changed, or this functionality should be factored out into a mixin in Mezzanine core.
* the template names and directory structure might warrant some attention
* we should think about variations and how that's going to work

In the long term I'd like Category models to be able to be limited to a single Product subclass. That would allow templates, sort options, and custom page processors that are specific to a single Product type.