Skip to content

How to Uninstall DjangoCMS Blog i.e. News

Wesley B edited this page Dec 13, 2023 · 9 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 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.

  2. Enter CMS container.

    docker exec core_cms /bin/bash

  3. (Optional) Confirm "apphooks" are in place:

    python3 manage.py cms list apphooks

    BlogApp[instance: ...] (draft/published)
  4. Uninstall relevant "apphooks":

    python3 manage.py cms uninstall apphooks BlogApp --noinput"

    2 'BlogApp' apphooks uninstalled

    ⚠ If settings has BLOG_AUTO_SETUP = True, then do not … list apphooks again or else "apphooks" will be recreated.

  5. (Optional) Confirm "apphooks" are missing.

    python3 manage.py cms uninstall apphooks BlogApp --noinput"

    no 'BlogApp' apphooks found
    1. Restart server.²
    2. Open CMS Pages admin UI. Blog/News page has no 🧩. icon.﹡
    3. Open Blog/News page while logged in. Admin toolbar has no "Blog" link.

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

  6. Reverse migrations for djangocms_blog app

    python3 manage.py migrate djangocms_blog zero

    Operations to perform:
      Unapply all migrations: djangocms_blog
    Running migrations:
      Rendering model states... DONE
      ...
      Unapplying djangocms_blog.0003_auto_20141201_2252... OK
      Unapplying djangocms_blog.0002_post_sites... OK
      Unapplying djangocms_blog.0001_initial... OK
  7. Delete the Blog/News page.

    ⚠ If you skip this step, then re-install blog, you might have an error about a missing BlogConfig.

  8. Remove "NEWS / BLOG" settings and autotaggit urls. (Restart server.)﹡

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

    ⚠ If settings has BLOG_AUTO_SETUP = True, then do not do anything to restart server or else "apphooks" will be recreated.

  9. Confirm djangocms_blog app is not installed nor active.

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

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

¹ Reverse migrations before removing djangocms_blog from INSTALLED_APPS (which should happen as a result of removing "NEWS / BLOG" settings) or else migrations can not be reversed (because djangocms_blog will not exist in the project to provide the migrations to be reversed).

² See How to Restart the CMS Server.