Skip to content

How to Uninstall DjangoCMS Blog i.e. News

W. Bomar edited this page Mar 16, 2022 · 9 revisions

Steps

Legend
  1. Step to perform:

    input

    output

    ☑ Note

Steps

  1. (Optional) Confirm "app" is installed and active.

    1. Open CMS Pages admin UI. News page has 🧩. icon?﹡
    2. Open 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. Confirm "apphooks" are installed:

    python3 manage.py cms list apphooks

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

    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.

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

    manage.py cms uninstall apphooks BlogApp --noinput

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

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

  5. Reverse migrations for djangocms_blog

    manage.py cms uninstall apphooks BlogApp --noinput

    no 'BlogApp' apphooks found
  6. Remove "NEWS / BLOG" settings. (Restart server.)﹡

    1. Open CMS Administation UI. Section "DJANGO CMS BLOG" absent.

    ﹡ Just editting a settings_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.


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

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