emencia / emencia-django-slideshows

A Django application to make slideshows
MIT License
5 stars 7 forks source link

Using as a cms plugin, do not generate needed database structures #7

Open slothyrulez opened 9 years ago

slothyrulez commented 9 years ago

Quick workarround: django-instance schemamigration slideshows --auto

Generate the needed migration, so can be used as cms plugin

A better aproach, split the package into a clear django-slideshows non cms related, and a new cmsplugin-slideshows.

sveetch commented 9 years ago

Hmmm, finally does not really seems to be a bug.

How did you initially synced the db ? With syncdb --all (like within the make assets from Epaster) or without the --all argument ?

Because without the --all argument, South take the hand and does not sync Models that have migrations, and there is no initial schemes for the plugin in the package migration because the plugin is a conditionnal part.

And after the syncdb, South effectively sync model using the intial migration schemes for each apps.

slothyrulez commented 9 years ago

Just copied the db from my partner :(

But actually he generated the database with Epaster's make install

sveetch commented 9 years ago

If it's from the project i think about (xbus), slideshows was not asked by roger, so it was disabled by default and so the make install did not synced it. Ask him.

sveetch commented 9 years ago

This is because it was planned time ago to move the plugin code to another repository and so it was removed out of the migrations schemas to avoid a bug when installing slideshows without cms (plugin migration schema was raising exceptions about missing cms models).

But there is a quickfix for this, just force the syncdb on the slideshows app when installing, this will effectively install the slideshow plugin models in your database.

I keep this issue opened for some time until the plugin repository is created.