Skip to content

How to Install DjangoCMS Blog i.e. News

Wesley Bomar edited this page Mar 16, 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. Open Blog/News page while logged in. Admin toolbar has no "Blog" link.
    3. 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.)﹡

    ﹡ Just editting a settings_custom.py might be adequate to restart server.²

    ☑ If settings has BLOG_AUTO_SETUP = True, then skip to final step.

  3. Confirm djangocms_blog app is installed.

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

    Also, if home page is opened, there is an error.

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

    After this, if home page is opened, there is an error.

  5. (Optional) Confirm djangocms_blog app migrations were successful.

    • Open home page. See no error.
  6. 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³ fro remaining values.
  7. Add Blog instance i.e. "apphook".

    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 APPLICATION to "Blog".
    7. Confirm APPLICATION CONFIGURATIONS is set to the correct config.
  8. (Optional) Confirm Blog is configured i.e. "apphooks" are in place:

    python3 manage.py cms list apphooks

    BlogApp[instance: Blog] (draft/published)
  9. 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.


⁰ 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).

² Remote servers deployed with a build system can be restarted by re-deploying. Remote servers deployed manually can be restarted by commands specific to the machine. Local servers can be restarted by making noop change to settings.py (ex: save file in editor or touch taccsite_cms/settings.py).

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