mezzanine-blocks icon indicating copy to clipboard operation
mezzanine-blocks copied to clipboard

Blocks selected by categories

Open tazogil opened this issue 11 years ago • 2 comments

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 ?

tazogil avatar Nov 28 '13 19:11 tazogil

Will take a look over the weekend.

renyi avatar Nov 29 '13 08:11 renyi

How did this turn out?

whardier avatar Mar 18 '15 22:03 whardier