<filename>hacker_hunt/settings.py
import os
from os.path import join, dirname
from dotenv import load_dotenv

dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)

# Accessing variables.
TOKEN = os.getenv('TOKEN')
DB = os.getenv('DB')
DB_NAME = os.getenv('DB_NAME')
PROD_DB = os.getenv('PROD_DB')

<filename>hacker_hunt/settings.py
import os
from os.path import join, dirname
from dotenv import load_dotenv

dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)

# Accessing variables.
TOKEN = os.getenv('TOKEN')
DB = os.getenv('DB')
DB_NAME = os.getenv('DB_NAME')
PROD_DB = os.getenv('PROD_DB')

# Accessing variables.