1

I am working on a multisite project and i am using mezzanine+cartridge for this. I want to use same inventory for both sites. But there are some issues with this: there is a field site_id in the product table which stores the ID of the current site. Thus, I cannot reuse product over sites.

Is there any way (like with the help of signals or anything) that I can save an entry twice in the database, with changes to some field's values?

If this is possible then I have to overwrite only site_id: the rest of the things remain the same as it was in the previous entry. Thereby it decreases the workload of entering products twice for different sites.

Thanks.

jro
  • 9,300
  • 2
  • 32
  • 37
user1746291
  • 323
  • 2
  • 5
  • 15
  • 2
    Maybe this [answer](http://stackoverflow.com/questions/14313538/use-same-inventory-for-multiple-sites-in-django-python/14317874#14317874) will help. – sneawo Jan 16 '13 at 08:22

1 Answers1

0

I would caution against writing the same thing twice. Some thing will definitely go wrong, and you will have two nonmatching db's. Why don't you make the site_id-product relationship M2M, so that you can have more than one site_id's?

ustun
  • 6,941
  • 5
  • 44
  • 57