CERT_PATH points to the wrong directory even though I set it correctly in my Django project

I'm working on a Django project and trying to configure SSL with the certificate.

I have set the CERT_PATH variable like this in my code:

import os
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent
CERT_PATH = os.path.join(BASE_DIR, "certs", "DigiCertGlobalRootG2.crt.pem")

However, when the code runs, it is looking for the certificate in the wrong directory:

in core/certs/ instead of certs/.

aParent
├── certs
│   └── DigiCertGlobalRootCA.crt.pem
└── core
    └── livenews
        └── services.py 
Вернуться на верх