Apphooks and app_name

19 views
Skip to first unread message

Daniele Procida

unread,
May 10, 2016, 5:20:37 AM5/10/16
to django CMS developers
If an apphook (CMSApp subclass) does not have an app_name attribute, django CMS will allows you to apply it to multiple pages without complaint, and will promptly throw a traceback as soon as you try to view any of the pages with the apphook applied.

(Just to make it more complicated, there are some circumstances in which one of the pages will be accessible, as long as it is unpublished.)

This is not an error on the part of either the developer or the user - it's a problem in the CMS.

I think the solution must be to prevent adding an apphook to multiple pages, even when it lacks the app_name attribute.

The error message when adding a second instance of an apphook with aN app_name attribute is:

An application instance with this name already exists.

I propose:

This application instance already exists.

Though frankly I don't like either of those messages really; "application instance" doesn't mean an awful lot to the average user.

Daniele

Reply all
Reply to author
Forward
0 new messages