Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks selected by categories #13

Open
tazogil opened this issue Nov 28, 2013 · 2 comments
Open

Blocks selected by categories #13

tazogil opened this issue Nov 28, 2013 · 2 comments

Comments

@tazogil
Copy link

tazogil commented Nov 28, 2013

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 ?

@renyi
Copy link
Owner

renyi commented Nov 29, 2013

Will take a look over the weekend.

@whardier
Copy link

How did this turn out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants