error when running migrate

my project was old python now using python 3 where do i start ?

when i run python3 or add runserver etc i get

python runsever
[‘/home/nt1506/NOC-Central/noc-central/noc-central’, ‘/home/nt1506/.pyenv/versions/3.9.7/lib/’, ‘/home/nt1506/.pyenv/versions/3.9.7/lib/python3.9’, ‘/home/nt1506/.pyenv/versions/3.9.7/lib/python3.9/lib-dynload’, ‘/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages’, ‘/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/noc-1.0-py3.9.egg’]
Traceback (most recent call last):
File “/home/nt1506/NOC-Central/noc-central/noc-central/”, line 13, in
from noc.apps.rancidmanager.models import InstallationParameter
File “/home/nt1506/NOC-Central/noc-central/noc-central/noc/apps/rancidmanager/”, line 2, in
from noc.apps.platformprovisioningtool.models import InstallationParameter
File “/home/nt1506/NOC-Central/noc-central/noc-central/noc/apps/platformprovisioningtool/”, line 24, in
class InstallationOutput(models.Model):
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/db/models/”, line 129, in new
app_config = apps.get_containing_app_config(module)
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/apps/”, line 260, in get_containing_app_config
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/apps/”, line 137, in check_apps_ready
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/conf/”, line 102, in getattr
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/conf/”, line 89, in _setup
self._wrapped = Settings(settings_module)
File “/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/conf/”, line 271, in init
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: DEFAULT_FILE_STORAGE/STORAGES are mutually exclusive.

please help i am stuck

The key information about this error is on the very last line. What do you think this error is telling you?

it is suggesting to choose one either storage/storage_default_file

i dont see where is this file to located , it is a old project, i cant remember the file name , i used grep -rl with that error in the Noc dir , i dont see anywhere hence why i wanted help by an expert?

These are configuration settings in your file. Look for the two entries shown in the error message. See DEFAULT_FILE_STORAGE and STORAGES

I dont have the file rather and

Ok, whatever - it’s in the file(s) where your settings are.

can give the content ? it wasnt there i added it after the encoutered that errorr

I don’t understand your question.

cant share the content of the code? and I am saying the storage div was added by me when I encountered that error.

hence why i said i dont see where it was located at first.

my big problem is to locate where storage file is setup … you mentioned usually in i dont have, I have in settings directory

The name of the file for the settings isn’t important - you can make it whatever you want.

What’s important are the contents of that file.

Look for those two entries in whatever file it is that you are storing your settings in.

thanks. it seems i dont have that setup, could i have a sample guide of how it has to be ?

Please post the contents of your settings files and of your file.


import os
import sys
import django
from import execute_from_command_line

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "noc.settings.local")
    # Use django.setup() to set up the application registry
   # django.setup()

    from noc.apps.rancidmanager.models import InstallationParameter



    ('Howard Jones', ''),

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'noc',
        'USER': 'noc',
        'PASSWORD': 'flfllfb',
        'HOST': '',                      # Empty for localhost through domain sockets or '' for localhost through TCP.
        'PORT': '',                      # Set to empty string for default.


ROOT_URLCONF = 'noc.urls.local'
WSGI_APPLICATION = 'noc.wsgi.local.application'

and this is my

"""Base settings shared by all environments"""
# Import global settings to make it easier to extend settings.
from django.conf.global_settings import *   # pylint: disable=W0614,W0401

# Generic Django project settings

DEBUG = True

# Local time zone for this installation. Choices can be found here:
USE_TZ = True
USE_I18N = True
USE_L10N = True
    ('en', 'English'),

# Make this unique, and don't share it with anybody.
SECRET_KEY = '5+0te&ctq#q@4t6s^04$4215zljs^db%qhu)fy&75=$5)6mmng'


#    'south',


# Calculation of directories relative to the project module location

import os
import sys
import noc as project_module

PROJECT_DIR = os.path.dirname(os.path.realpath(project_module.__file__))

PYTHON_BIN = os.path.dirname(sys.executable)
ve_path = os.path.dirname(os.path.dirname(os.path.dirname(PROJECT_DIR)))
# Assume that the presence of '' in the python bin/
# directory means that we're running in a virtual environment.
if os.path.exists(os.path.join(PYTHON_BIN, '')):
    # We're running with a virtualenv python executable.
    VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
elif ve_path and os.path.exists(os.path.join(ve_path, 'bin',
    # We're running in [virtualenv_root]/src/[project_name].
    VAR_ROOT = os.path.join(ve_path, 'var')
    # Set the variable root to a path in the project which is
    # ignored by the repository.
    VAR_ROOT = os.path.join(PROJECT_DIR, 'var')

if not os.path.exists(VAR_ROOT):

# Project URLS and media settings

ROOT_URLCONF = 'noc.urls'

LOGIN_URL = '/login/'
LOGOUT_URL = '/logout/'

STATIC_URL = '/static/'
MEDIA_URL = '/uploads/'

STATIC_ROOT = os.path.join(VAR_ROOT, 'static')
MEDIA_ROOT = os.path.join(VAR_ROOT, 'uploads')

    os.path.join(PROJECT_DIR, 'static'),


# Templates

    os.path.join(PROJECT_DIR, 'templates'),

TEMPLATES[0]['OPTIONS']['context_processors'] += [

# Middleware


# Auth / security


# Miscellaneous project settings

# Third party app settings

What is this?

(What is the InstallationParameter in the that file?)

Note: You should not have this line:

Quoting directly from the docs at Django settings | Django documentation | Django

Note that a settings file should not import from global_settings , because that’s redundant.

Thinking about this some more, what I would recommend is that you get a known-good settings file (perhaps the one created by “startproject”, and change it to add your specific requirements here for this environment. Then, once you’ve validated the settings, go ahead and recreate the structure your using now, starting from that validated base.

thank you I will revert back tomorrow it is midnight here thank you so so much o far

Hi dear,

where do i define my storage and how to reference it ? any links or doc ?

The docs are in the links above at error when running migrate - #4 by KenWhitesell

The definitions belong in your settings file.