"""
ASGI config for django project.

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

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

import os

from django.core.asgi import get_asgi_application

# Read environment variables from a .env file
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())

if os.getenv('PRODUCTION', False) == 'True':
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production')
else:
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local')

application = get_asgi_application()

"""
ASGI config for django project.

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

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

import os

from django.core.asgi import get_asgi_application

# Read environment variables from a .env file
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())

if os.getenv('PRODUCTION', False) == 'True':
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production')
else:
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local')

application = get_asgi_application()

ASGI config for django project.  It exposes the ASGI callable as a module-level variable named ``application``.  For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ # Read environment variables from a .env file