How it works...

The apphooks are the interfaces that join the URL configuration of apps to the CMS pages. The apphooks need to extend from CMSApp. To define the name, which will be shown in the Application selection list under the Advanced Settings of a page, put the path of the apphook in the CMS_APPHOOKS project setting (only if automatic discovery is not desired), and restart the web server. The apphook will appear as one of the applications in the advanced page settings, as shown in the following screenshot:

After selecting an application for a page and publishing it, you must restart the server for the URLs to take effect, unless you have included  cms.middleware.utils.ApphookReloadMiddleware as close to the start of your MIDDLEWARE list as possible, in settings.py. This middleware handles reloading the application automatically; in many cases, a restart would otherwise be necessary.

The templates of the app should extend the page template if you want them to contain the placeholders or attributes of the page, such as the title or the description meta tags.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.125.51