divio/django-cms — pull request #1187 by mpaolini (2012-03-02 14:14:04+00:00)
Title: Remove phantom empty plugins before adding a new plugin in a placeholder

I call "phantom" a plugin that does not have a real (non-abstract) model associated to it.

This can happen when:
- a user clicks the "add" button in a placehoder using the cms-toolbar
- the admin form for the custom model associated with the plugin is shown
- the user clicks "cancel"

Phantom plugins can't be deleted by toolbar contextual editing, but they still occupy a place
in the placeholder.

If the placeholder has a plugin limit on it, phantom plugins prevent insertion of new plugins.