After being inspired by django-oscar, I tried to put a cmsplugin inside its main app. However, after doing a schemamigration --initial
I can't use the plugin in Django CMS.
DatabaseError: (1146, "Table 'devel_test.cmsplugin_galleries_gallerycontainer_galleries' doesn't exist")
App Tree
- gallery
- apps
- cmsplugin_galleries
- migrations
- cms_plugins.py
- init.py
- models.py
- init.py
- migrations
- static
- templates
- admin.py
- init.py
- models.py
- views.py
Gallery models
class Gallery(models.Model):
title = models.CharField(_(u'title'), max_length=200)
description = models.TextField(_(u'description'), blank=True)
image_folder = FilerFolderField(verbose_name=_(u'image folder'))
is_video = models.BooleanField(_(u'is video content'), default=False)
snippet = models.TextField(_(u'video snippet'))
class Meta:
verbose_name = _(u'Gallery')
verbose_name_plural = _(u'Galleries')
class GalleryImage(models.Model):
gallery = models.ForeignKey(Gallery, verbose_name=_(u'gallery'))
title = models.CharField(_(u'title'), max_length=200, blank=True)
src = FilerImageField(verbose_name=_(u'image'))
Cmsplugin_galleries models
class GalleryContainer(CMSPlugin):
title = models.CharField(_(u'title'), max_length=200)
galleries = models.ManyToManyField(Gallery, verbose_name=_(u'galleries'))
def __unicode__(self):
return u'%s' % self.title
Since I can properly run it using syncdb --all
, what did I do wrong?
Notes:
Using syncdb
creates a table with the name cmsplugin_galleries_gallerycontainer_galleries
but using south, the table name is cmsplugin_gallerycontainer_galleries
Thanks