text: import os
  
  import environ
  
  env = environ.Env()
  environ.Env.read_env(env_file='.env')
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  SECRET_KEY = env('SECRET_KEY')
  DEBUG = env.bool('DEBUG', False)
  
  ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1']
  ALLOWED_HOSTS += env.list('ALLOWED_HOSTS', default=[])
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'rest_framework',
      'django_filters',
      'rest_framework_simplejwt',
      'polls',
      'drf_yasg'
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'polls_project.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
              ],
          },
      },
  ]
  
  WSGI_APPLICATION = 'polls_project.wsgi.application'
  
  DATABASES = {
      'develop': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      },
      'production': {
          'ENGINE': env('DB_ENGINE'),
          'NAME': env('DB_NAME'),
          'USER': env('POSTGRES_USER'),
          'PASSWORD': env('POSTGRES_PASSWORD'),
          'HOST': env('DB_HOST'),
          'PORT': env('DB_PORT'),
      }
  }
  
  DATABASES['default'] = DATABASES['develop' if DEBUG else 'production']
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  STATIC_URL = '/static/'
  STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  
  REST_FRAMEWORK = {
      'DEFAULT_PAGINATION_CLASS':
          'rest_framework.pagination.PageNumberPagination',
      'PAGE_SIZE': 10,
      'DEFAULT_PERMISSION_CLASSES': [
          'rest_framework.permissions.IsAuthenticatedOrReadOnly',
      ],
      'DEFAULT_AUTHENTICATION_CLASSES': (
          'rest_framework.authentication.BasicAuthentication',
          'rest_framework_simplejwt.authentication.JWTAuthentication',
      ),
      'DEFAULT_FILTER_BACKENDS': [
          'django_filters.rest_framework.DjangoFilterBackend'
      ]
  }
  
  SWAGGER_SETTINGS = {
      'USE_SESSION_AUTH': False
  }
  