"""
WSGI config for django_project project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""

import os
import sys

from django.core.wsgi import get_wsgi_application
from dotenv import load_dotenv

env_path = 'var/www/secure340b-portal/.env'
load_dotenv(env_path)  # take environment variables from .env.

sys.path.append('/var/www/secure340b-portal')
sys.path.append('/var/www/secure340b-portal/django_project')
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project.settings')
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_project.settings'


application = get_wsgi_application()
