They're already SiteRelated -

>>> import inspect
>>> inspect.getmro(Product)
(<class 'cartridge.shop.models.Product'>, <class
'mezzanine.core.models.Displayable'>, <class
'mezzanine.core.models.Slugged'>, <class
'mezzanine.core.models.SiteRelated'>, <class
'mezzanine.core.models.MetaData'>, <class
'mezzanine.core.models.TimeStamped'>, <class
'cartridge.shop.models.Priced'>, <class 'mezzanine.core.models.RichText'>,
<class 'django.db.models.base.Model'>, <class
'mezzanine.utils.models.AdminThumbMixin'>, <type 'object'>)
>>> inspect.getmro(Category)
(<class 'cartridge.shop.models.Category'>, <class
'mezzanine.pages.models.Page'>, <class 'mezzanine.pages.models.BasePage'>,
<class 'mezzanine.core.models.Orderable'>, <class
'mezzanine.core.models.Displayable'>, <class
'mezzanine.core.models.Slugged'>, <class
'mezzanine.core.models.SiteRelated'>, <class
'mezzanine.core.models.MetaData'>, <class
'mezzanine.core.models.TimeStamped'>, <class
'mezzanine.core.models.RichText'>, <class 'django.db.models.base.Model'>,
<type 'object'>)

If they're not acting as such, you may have misconfigured your Site records

On Sat, May 30, 2015 at 8:14 AM, Andrew Fam <[email protected]> wrote:

> Trying to build a multitenanted ecommerce platform.
> Any idea how to add SiteRelated to the Product and Category? I tried the
> following below but the migrations don't register
>
> from django.db import models
>
> from cartridge.shop.models import Product
> from cartridge.shop.models import Category
> from mezzanine.core.models import SiteRelated
>
> Product.__bases__ += (SiteRelated,)
> Category.__bases__ += (SiteRelated,)
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to