python - django-cms and error with CMS_PLACEHOLDER_CONF -
in project have error:
" file "/home/xxx/www/yyy/cms/utils/placeholder.py", line 43, in validate_placeholder_name raise improperlyconfigured("placeholder identifiers names may not " django.core.exceptions.improperlyconfigured: placeholder identifiers names may not contain non-ascii characters. if wish placeholder identifiers contain non-ascii characters when displayed users, please use cms_placeholder_conf setting 'name' key specify verbose name. "
my settings.py hasn't got cms_placeholder_conf, default {} - empty dict.
any idea why have error , not have default settings?
your error in line
content = placeholderfield(_(u'content'), help_text="plugins")
you can't pass translatable string placeholder name(slot) because 1 of translations have non-ascii character, not mention multiple problems arise since string used identifier. here's do:
content = placeholderfield(u'content', help_text="plugins")
and add proper translatable string in configuration placeholder allows give more human readable name , have in different languages using django translations framework:
cms_placeholder_conf = { 'content': { 'name': gettext("content"), }, }
Comments
Post a Comment