mezzanine-blocks
mezzanine-blocks copied to clipboard
Blocks selected by categories
Please, I want to give the possibility for a admin user to add some blocks in his pages through a select menu of (blocks) categories. I think a injection field is the solution, so in my settings : EXTRA_MODEL_FIELDS = ( ( "mezzanine.pages.models.Page.blocks", "django.db.models.ManyToManyField", ("mezzanine_blocks.models.BlockCategory",), {}, ), ) ERROR when running dev server : pages.page: 'blocs' has an m2m relation with model mezzanine_blocks.models.BlockCategory, which has either not been installed or is abstract. No error if I replace "mezzanine_blocks.models.BlockCategory" by "mezzanine_blocks.BlockCategory" . But : python manage.py schemamigration pages -v=3 --auto --stdout > mymigration.py fails : TypeError: 'NoneType' object has no attribute 'getitem'
am I missing something ? Is theire a better way to get that ?
Will take a look over the weekend.
How did this turn out?