Closed hkage closed 11 years ago
Hi Henning
That's a known problem, and I'm not sure how this should be solved. We're emulating a lazy foreign key with the PLATA_SHOP_PRODUCT
setting, something which isn't really supported by Django (and therefore not supported by South either).
I'm using the simple
example to create the migrations, unfortunately this means that products in all other apps will lead to the errors you're seeing.
I'm a bit stumped how we can provide migrations in Plata itself and still support PLATA_SHOP_PRODUCT
.
Your fix is certainly correct but involves handiwork, something which I'd like to avoid if possible at all.
Thanks, Matthias
So maybe including migrations wasn't such a good idea after all.
I'm thinking that the best way forward might be to remove the migrations, and provide instructions in the release notes how migrations could be generated if necessary.
Opinions?
I for one vouch for not having migrations, just because "simpler is better"
One argument against migrations would be that the final Product model is configurable and hence not suitable for migrations. So I'd prefer some kind of documentation that explains how to activate (and maintain) migrations for a distinct Plata installation.
Hi there,
we recently added plata to our Django application and are using an existing database with South. We added plata to the
INSTALLED_APPS
list and calledmanage.py migrate
for each application added to the list. We didn't use Django's syncdb command.The initial data script for "plata.shop" (0001_initial) fails, as it refers to "simple.Product" which does not exists:
It seems that the initial South migration file uses a non existing app or has an old reference to the plata example app, that isn't part of the source distribution anymore. Therefore we used the following workaround to successfully migrate the whole plata application:
manage.py syncdb
migrate --fake shop
Maybe you could modify the initial migration file, so that migrating Plata on an existing database without syncdb works.
Thanks in advance, Henning