blurps: make it possible to mark blurps as private

This commit is contained in:
Frédéric Péters 2015-01-14 11:33:22 +01:00
parent f703a6799b
commit ebff1e6ad1
2 changed files with 12 additions and 0 deletions

10
README
View File

@ -69,6 +69,16 @@ local_settings.py file set in the same directory, or by a file referenced
in the COMBO_SETTINGS_FILE environment variable.
Blurps (from cmsplugin-blurp module) can be used to define additional cell
types, the CMS_PLUGIN_BLURP_RENDERERS variable is used to hold them, details
can be found in the cmsplugin-blurp documentation.
In addition to common attributes Combo supports a 'private' attribute, that can
be used to exclude the given blurp from selectable cells. The blurp itself can
still be referenced manually in a template file. This is useful to avoid
overwhelming the UI with blurps used in non-editable parts of the pages.
License
-------

View File

@ -283,6 +283,8 @@ class BlurpCell(CellBase):
l = []
base_content_type = ContentType.objects.get_for_model(cls)
for blurp_key, blurp_value in blurp_renderers.items():
if blurp_value.get('private'):
continue
l.append({
'name': blurp_value.get('name'),
'content_type': base_content_type,