Proposal: Excluding plugins from registration

17 views
Skip to first unread message

Iacopo Spalletti

unread,
Dec 1, 2015, 3:21:29 PM12/1/15
to django-cms...@googlegroups.com
I usually have this case in which I install external applications in a
project just to use a subset of their features / plugins.
This imply configuring each placeholder through CMS_PLACEHOLDER_CONF to
only show a subset of the installed plugins to avoid confusing the users.
This is great, but sometimes you just to want to hide some plugins
completely from the website.

We can easily achieve this by modifying the plugin_pool.register_plugin
to ignore plugins whose class name matches a configurable list of names.

It's a simple feature with no backward compatible issue and will allow a
nice flexibility at little to no cost.

Cheers,
Iacopo

Jonas Obrist

unread,
Dec 1, 2015, 9:02:19 PM12/1/15
to django CMS developers
That feature already exists (but is undocumented AFAIK): https://github.com/divio/django-cms/blob/develop/cms/plugin_pool.py#L122

What's wrong with unregister_plugin?

Iacopo Spalletti

unread,
Dec 2, 2015, 4:28:11 AM12/2/15
to django-cms...@googlegroups.com
On 02/12/2015 03:02, Jonas Obrist wrote:
> That feature already exists (but is undocumented
> AFAIK): https://github.com/divio/django-cms/blob/develop/cms/plugin_pool.py#L122
>
> What's wrong with unregister_plugin?

Nothing wrong with it, but it's code and not configuration, plus it
fails if plugin is not registered, thus order in INSTALLED_APPS matters.

>
> On Wednesday, December 2, 2015 at 5:21:29 AM UTC+9, yakky wrote:
>
> I usually have this case in which I install external applications in a
> project just to use a subset of their features / plugins.
> This imply configuring each placeholder through CMS_PLACEHOLDER_CONF to
> only show a subset of the installed plugins to avoid confusing the
> users.
> This is great, but sometimes you just to want to hide some plugins
> completely from the website.
>
> We can easily achieve this by modifying the plugin_pool.register_plugin
> to ignore plugins whose class name matches a configurable list of
> names.
>
> It's a simple feature with no backward compatible issue and will
> allow a
> nice flexibility at little to no cost.
>
> Cheers,
> Iacopo
>
> --
> Message URL:
> https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
> Unsubscribe: send a message to
> django-cms-devel...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-cms-devel...@googlegroups.com
> <mailto:django-cms-devel...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/django-cms-developers/07388a8d-5455-45c3-b276-4f7d4c86fed9%40googlegroups.com
> <https://groups.google.com/d/msgid/django-cms-developers/07388a8d-5455-45c3-b276-4f7d4c86fed9%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages