[Answer]-Django-cms and error with CMS_PLACEHOLDER_CONF

1👍

Your error is in this line

content = PlaceholderField(_(u'Content'), help_text="Plugins")

you can’t pass a translatable string as the placeholder name(slot) simply because one of the translations could have a non-ascii character, not to mention the multiple problems that will arise since the string is used as an identifier. Here’s what I would do:

content = PlaceholderField(u'content', help_text="Plugins")

and then add the proper translatable string in the configuration for the placeholder which allows you to give a more human readable name and also have it in different languages using the django translations framework:

CMS_PLACEHOLDER_CONF = {
    'content': {
        'name': gettext("Content"),
    },
}
👤Paulo

Leave a comment