Skip to content

How to Install DjangoCMS Blog i.e. News

Wesley B edited this page Dec 6, 2022 · 29 revisions
Legend
  1. Step to perform:

    input

    output

    ℹ️ Note

Steps

ℹ️ The djangocms-blog package and all its dependencies are installed in Core CMS by default.⁰

  1. Confirm app is not installed nor active.

    1. Open CMS Administation UI. Section "DJANGO CMS BLOG" absent.
    2. (if Blog/News page present) Open Blog/News page while logged in. Admin toolbar has no "Blog" link.
    3. (if Blog/News page present) Open CMS Pages admin UI. Blog/News page has no 🧩. icon.﹡

    ﹡ In same column where Home page has 🏠. icon.

  2. Add "NEWS / BLOG" settings﹡. (Restart server.)†

    ﹡ Settings may have moved since reference commit.
    † Just editing a settings_custom.py might be adequate to restart server.²

  3. Confirm djangocms_blog app is installed.

    1. Open CMS Administation UI. Section "DJANGO CMS BLOG" exists?

    Also, if any CMS page is opened, there is a djangocms_blog... error.

  4. (In CMS container) Migrate djangocms_blog app

    python3 manage.py migrate djangocms_blog

    Operations to perform:
      Apply all migrations: djangocms_blog
    Running migrations:
      Applying djangocms_blog.0001_initial... OK
      Applying djangocms_blog.0002_post_sites... OK
      Applying djangocms_blog.0003_auto_20141201_2252...
      ...

    ℹ️ If settings has BLOG_AUTO_SETUP = True, then skip to step 7.

  5. Add Blog config i.e. "apphook" config.

    1. Open CMS Administation UI.
    2. In section "DJANGO CMS BLOG", add a Blog config.
    3. Talk a CMS admin aware of the client needs³ to set the following values:
      • INSTANCE NAME: Uncertain. Set to the same value as "APPLICATION TITLE". (default: "Blog")
      • APPLICATION TITLE: Title of the BlogConfig instance created by Auto setup. (default: "Blog")
      • OBJECT NAME: The CMS name for a Blog item. (default: "Article")
    4. (Optional) Ask a CMS admin aware of the client needs³ for remaining values.
  6. Add Blog instance i.e. "apphook" to a Page.

    1. Open CMS Administation UI.
    2. In section "DJANGO CMS", add a Page.
    3. Talk a CMS admin aware of the client needs³ to set the following values:
      • TITLE
      • SLUG
    4. Save the page.
    5. Edit the Page's Advanced Settings.
    6. Set the following values:
      • ATTACHED MENU: "Blog menu"
      • APPLICATION: "Blog"
      • APPLICATION CONFIGURATIONS: (appears only after choosing APPLICATION) (Check whether auto-set value is accurate.)
    7. Publish page.*
    8. Restart server.*

    ﹡ Page must be published before server restart. Otherwise, new page will not render blog content.

  7. (Optional) Confirm Blog is configured i.e. "apphooks" are in place:

    python3 manage.py cms list apphooks

    BlogApp[instance: ...] (draft/published)
  8. Confirm djangocms_blog app is installed and active.

    1. Open CMS Pages admin UI. Blog/News page has 🧩. icon?﹡
    2. Open Blog/News page while logged in. Admin toolbar has "Blog" link?
    3. Open CMS Administation UI. Section "DJANGO CMS BLOG" exists?

    ﹡ In same column where Home page has 🏠. icon.

  9. Confirm new Blog instance is working.

    1. Add and publish an article. Article shows up on new page?
    2. Open new page while logged in. Page shows "No articles found"?

    ℹ️ If article is not published, it will not show.


⁰ After FP-1487, the package djangocms_blog might not be installed by default.

¹ Migrate after adding djangocms_blog to INSTALLED_APPS (which should happen as a result of adding "NEWS / BLOG" settings) or else migrations can not occur (because djangocms_blog will not exist in the project to provide the migrations).

² See How to Restart the CMS Server.

³ A CMS admin on the CMD staff usually serves this role. Or maybe you serve this role.