I tried to load environment variables from a file named .env to settings.py file here i created the .env file and settings file same folder.
this is my .env file >
Try this instead:
import os import environ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) environ.Env.read_env(env_file=os.path.join(BASE_DIR, '.env'))