[Fixed]-Django : Getting error while removing django.contrib.sites from INSTALLED_APPS

1👍

Seems to be resolved by myself. Following things I have done to resolve it:

  1. Remove following from settings.py

    SITE_ID = 1

and ‘django.contrib.sites' from the INSTALLED_APPS block

INSTALLED_APPS = [
    ‘django.contrib.sites'
]
  1. Removed auto-generated files from migrations folder inside the apps (App in which I have imported django.contrib.sites Models).

  2. Re-run the makemigrations and migrate command.

  3. Everything is working fine.

Thanks.

👤Dipak

Leave a comment