Apphooks
We do this with an apphook, created using a CMSApp
sub-class, which tells the CMS how to include that application.
Apphooks live in a file called , so create one in your Polls/CMS Integration application, i.e. in polls_cms_integration
.
This is the most basic example of an apphook for a django CMS application:
Apply the apphook to a page
Now we need to create a new page, and attach the Polls application to it through this apphook.
Create and save a new page, then publish it.
Note
In its Advanced settings, choose “Polls Application” from the Application menu. Leave the Application instance name on the provided default (), and save once more.
Refresh the page, and you’ll find that the Polls application, along with any polls you have created, is now available directly from the new django CMS page.