Skip to content

How to Install DjangoCMS Blog i.e. News

Wesley B edited this page Dec 13, 2023 · 29 revisions

Steps

  1. (Optional) Check whether blog is already installed.
    1. Open CMS Admin UI. Is section "DJANGO CMS BLOG" present?
    2. If so, a blog is already installed and active.
    3. Proceed to next step to check whether blog is configured.

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

  2. (Optional) Check whether blog is already configured.
    1. Open Blog/News page while logged in. Does admin toolbar have "Blog" link?
    2. If so, open CMS Pages in the Admin UI. Does Blog/News page have a 🧩.﹡
    3. If so, a blog is already configured.
    4. If not, proceed to next step to configure the blog.

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

  3. Add "NEWS / BLOG" settings to your taccsite_cms/settings_local.py.

  4. Add taggit_autosuggest URLs to your taccsite_cms/url_custom.py.

  5. Restart server (if not already restarted by having edited settings_local.py).²

  6. Run migrations for the djangocms_blog app.¹

    docker exec -it core_cms sh -c "python manage.py migrate"

    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...
      ...
  7. Confirm djangocms_blog app is now installed.
    1. Open CMS Administation UI. Section "DJANGO CMS BLOG" exists?

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

  8. If settings_local.py has BLOG_AUTO_SETUP = True, then skip to step 12.

  9. 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", suggested: ? )
      • APPLICATION TITLE: Title of the BlogConfig instance created by Auto setup. (default: "Blog", suggested: "News")
      • 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.
  10. 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.

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

    python3 manage.py cms list apphooks

    BlogApp[instance: ...] (draft/published)
  12. Confirm djangocms_blog app is now 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 Administration UI. Section "DJANGO CMS BLOG" exists?

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

  13. 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.