Integrating a third-party applicationΒΆ

We’ve already written our own django CMS plugins and apps, but now we want to extend our CMS with a third party app, Aldryn News & Blog.

First, we need to install the app into our virtual environment from PyPI:

pip install aldryn-newsblog

Add the app and any of its requirements that are not there already to INSTALLED_APPS in Some will be already present; it’s up to you to check them:


One of the dependencies is django-filer. It provides a special feature that allows nicer image cropping. For this to work it needs it’s own thumbnail processor (easy-thumbnails) to be inserted in

    # 'easy_thumbnails.processors.scale_and_crop',

aldryn-newsblog uses aldryn-boilerplates to provide multiple sets of templates and staticfiles for different css frameworks. We’re using bootstrap3 in this tutorial, so lets choose bootstrap3.:


Add boilerplates finder to STATICFILES_FINDERS:

    # important! place right before django.contrib.staticfiles.finders.AppDirectoriesFinder

If STATICFILES_FINDERS is not defined in your just copy and paste the above code.

Add the boilerplate template loader to TEMPLATE_LOADERS:


Add the boilerplates context processor to TEMPLATE_CONTEXT_PROCESSORS:

    # ...

Since we added a new app, we need to update our database:

python migrate

Start the server again.

The newsblog application comes with a django CMS apphook, so add a new django CMS page (let’s call it ‘Blog’), and add the blog application to it as you did for Polls in the previous tutorial step. In this case we also have to add an “Application configuration” (see the field right under the apphook field). You can configure some settings here, like the url format. It’s also possible to add multiple instances of the application, if you like. The Instance namespace should be blog (this is used for reversing urls). Choose Blog as the Application title and choose whatever Permalink type you prefer.

Publish the new page, and you should find the blog application at work there.

You may need to restart your server at this point.

You can add new blog posts using the admin, but also have a look at the toolbar. When you’re within the urls of the blog, you should see an extra menu item called “Blog”. You can now select “Blog” > “Add new article...” from it and add a new blog post directly from there.

Try also inserting a “Latest articles” plugin into another page - as a good django CMS application, Aldryn News & Blog comes with plugins.

In the next tutorial, we’re going to integrate our Polls app into the toolbar in, just like the blog application has been.