Deploy Django on render

Hi, I am trying to deploy my Django app to to render
when I set the settings configuration I got this error

Traceback (most recent call last):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 22, in <module>
    main()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line  
    utility.execute()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 89, in __getattr__
    self._setup(name)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 19, in <module>
    import django.contrib.contenttypes.models
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\contrib\contenttypes\models.py", line 139, in <module>
    class ContentType(models.Model):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\db\models\base.py", line 134, in __new__
    raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.       

(venv) C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore>python manage.py makemigrations 
Traceback (most recent call last):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 22, in <module>
    main()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line  
    utility.execute()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 89, in __getattr__
    self._setup(name)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 19, in <module>
    import django.contrib.contenttypes.models
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\contrib\contenttypes\models.py", line 139, in <module>
    class ContentType(models.Model):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\db\models\base.py", line 134, in __new__
    raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.       

(venv) C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore>python manage.py makemigrations 
Traceback (most recent call last):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 22, in <module>
    main()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 89, in __getattr__
    self._setup(name)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 19, in <module>
    import django.contrib.contenttypes.models
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\contrib\contenttypes\models.py", line 139, in <module>
    class ContentType(models.Model):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\db\models\base.py", line 134, in __new__
    raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.       

setting.py

"""
Django settings for bookstore project.

Generated by 'django-admin startproject' using Django 5.0.4.

For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

# from django.contrib.auth.models import User
import django

django.setup()
from pathlib import Path
import os
import django.contrib.contenttypes.models
import environ
import dj_database_url
from django.core.wsgi import get_wsgi_application
from decouple import config
from django.contrib.auth.models import User

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
env = environ.Env()
environ.Env().read_env()
application = get_wsgi_application()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bookstore.settings")


def str_to_list(value):
    return [item.strip() for item in value.split(",")]


os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = config("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config("DEBUG")

ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS_DEPLOY")


# Application definition

INSTALLED_APPS = [
    "django.contrib.contenttypes",
    "app.apps.AppConfig",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "rest_framework",
    "corsheaders",
]
MIDDLEWARE = [
    "corsheaders.middleware.CorsMiddleware",
    "django.middleware.security.SecurityMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = "bookstore.urls"

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]

WSGI_APPLICATION = "bookstore.wsgi.application"
# AUTH_USER_MODEL = django.contrib.auth.models.User

# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

# DATABASES = {
#     "default": {
#         "ENGINE": "django.db.backends.postgresql_psycopg2",
#         "NAME": "bookstore",
#         "USER": "postgres",
#         "PASSWORD": "root",
#         "HOST": "localhost",
#         "PORT": "5432",
#     }
# }

DATABASES = {
    "default": dj_database_url.parse(config("DATABASE_URL")),
}

REST_FRAMEWORK = {
    "DEFAULT_PERMISSIONS_CLASSES": {
        "rest_framework.permissions.IsAuthenticated",
    },
    "DEFAULT_AUTHENTICATION_CLASSES": (
        "rest_framework.authentication.SessionAuthentication",
    ),
}

# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
    },
]
AUTH_USER_MODEL = User

# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/

STATIC_URL = "/static/"
MEDIA_URL = "/images/"
MEDIA_ROOT = os.path.join(BASE_DIR, "images")
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

CSRF_TRUSTED_ORIGINS = [config("CSRF_TRUSTED_ORIGINS_DEPLOY")]

CORS_ALLOWED_WHITLEST = config("CORS_ALLOWED_WHITLEST_DEPLOY", cast=str_to_list)

CORS_ALLOWED_ORIGINS = config("CORS_ALLOWED_ORIGINS_DEPLOY", cast=str_to_list)

ALLOWED_HOSTS = config("ALLOWED_HOSTS_DEPLOY", cast=str_to_list)
CORS_ORIGIN_ALLOW_ALL = True

CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_ALL_ORIGINS = True

Why are you importing the contenttypes module in your settings.py? Importing models in the settings won’t work, as they depend on settings which won’t have been defined yet (which I think is what’s happening here).

I delete importing content types from settings , and I still got an error

"""
Django settings for bookstore project.

Generated by 'django-admin startproject' using Django 5.0.4.

For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

# from django.contrib.auth.models import User
import django

django.setup()
from pathlib import Path
import os
import environ
import dj_database_url
from django.core.wsgi import get_wsgi_application
from decouple import config


# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
env = environ.Env()
environ.Env().read_env()
application = get_wsgi_application()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bookstore.settings")


def str_to_list(value):
    return [item.strip() for item in value.split(",")]


os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = config("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config("DEBUG")

ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS_DEPLOY")


# Application definition

INSTALLED_APPS = [
    "app",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "rest_framework",
    "corsheaders",
]
MIDDLEWARE = [
    "corsheaders.middleware.CorsMiddleware",
    "django.middleware.security.SecurityMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = "bookstore.urls"

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]

WSGI_APPLICATION = "bookstore.wsgi.application"
# AUTH_USER_MODEL = django.contrib.auth.models.User

# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

# DATABASES = {
#     "default": {
#         "ENGINE": "django.db.backends.postgresql_psycopg2",
#         "NAME": "bookstore",
#         "USER": "postgres",
#         "PASSWORD": "root",
#         "HOST": "localhost",
#         "PORT": "5432",
#     }
# }

DATABASES = {
    "default": dj_database_url.parse(config("DATABASE_URL")),
}

REST_FRAMEWORK = {
    "DEFAULT_PERMISSIONS_CLASSES": {
        "rest_framework.permissions.IsAuthenticated",
    },
    "DEFAULT_AUTHENTICATION_CLASSES": (
        "rest_framework.authentication.SessionAuthentication",
    ),
}

# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
    },
]


# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/

STATIC_URL = "/static/"
MEDIA_URL = "/images/"
MEDIA_ROOT = os.path.join(BASE_DIR, "images")
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

CSRF_TRUSTED_ORIGINS = [config("CSRF_TRUSTED_ORIGINS_DEPLOY")]

CORS_ALLOWED_WHITLEST = config("CORS_ALLOWED_WHITLEST_DEPLOY", cast=str_to_list)

CORS_ALLOWED_ORIGINS = config("CORS_ALLOWED_ORIGINS_DEPLOY", cast=str_to_list)

ALLOWED_HOSTS = config("ALLOWED_HOSTS_DEPLOY", cast=str_to_list)
CORS_ORIGIN_ALLOW_ALL = True

CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_ALL_ORIGINS = True

I got this error

Traceback (most recent call last):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 22, in <module>
    main()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 89, in __getattr__
    self._setup(name)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module      
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 19, in <module>
    import django.contrib.contenttypes.models
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\contrib\contenttypes\models.py", line 139, in <module>
    class ContentType(models.Model):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\db\models\base.py", line 134, in __new__
    raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

(venv) C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore>python manage.py runserver
Traceback (most recent call last):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 22, in <module>
    main()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 89, in __getattr__
    self._setup(name)
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\olaro\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module      
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 24, in <module>
 5, in <module>
    from django.contrib.contenttypes.models import ContentType
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\contrib\contenttypes\models.py", line 139, in <module>
    class ContentType(models.Model):
  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2\e-commerce\venv\Lib\site-packages\django\db\models\base.py", line 134, in __new__
    raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

The error is still saying the import is there:

  File "C:\Users\olaro\OneDrive\Masaüstü\e-commerce2 - Copy\e-commerce\bookstore\bookstore\settings.py", line 19, in <module>
    import django.contrib.contenttypes.models

From the rest of the stack trace, this is the settings file Django is using for your project. Did you remove it from the right file?

yes I did remove it from settings.py

The stack-trace says otherwise - it’s clearly still there. Make sure you removed it from the right file (see path above), and restart Django.