text: import os
  import dj_database_url
  import django_heroku
  from decouple import config,Csv
  from django.contrib.messages import constants as message_constants
  from django.contrib.messages import constants as messages
  
  MESSAGE_TAGS = {
      messages.DEBUG: 'alert-info',
      messages.INFO: 'alert-info',
      messages.SUCCESS: 'alert-success',
      messages.WARNING: 'alert-warning',
      messages.ERROR: 'alert-danger',
  }
  
  MESSAGE_LEVEL = message_constants.DEBUG
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  SECRET_KEY = config('SECRET_KEY')
  DEBUG = config('DEBUG', default=False, cast=bool)
  ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
  
  INSTALLED_APPS = [
      'air',
     #'bootstrap3',
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  ]
  
  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',
      'whitenoise.middleware.WhiteNoiseMiddleware',
  
  ]
  
  ROOT_URLCONF = 'sales.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 = 'sales.wsgi.application'
  
  
  if config( 'MODE' ) == "dev":
      DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.postgresql_psycopg2',
              'NAME': config( 'DB_NAME' ),
              'USER': config( 'DB_USER' ),
              'PASSWORD': config( 'DB_PASSWORD' ),
              'HOST': config( 'DB_HOST' ),
              'PORT': '',
          }
      }
  else:
      DATABASES = {
          'default': dj_database_url.config(
              default=config( 'DATABASE_URL' )
          )
      }
  db_from_env = dj_database_url.config(conn_max_age=500)
  DATABASES['default'].update(db_from_env)
  
  
  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 = 'Africa/Nairobi'
  USE_I18N = True
  USE_L10N = True
  USE_TZ = True
  
  STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
  STATIC_URL = '/static/'
  STATICFILES_DIRS = [
      os.path.join(BASE_DIR, "static"),
  ]
  
  STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
  
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  
  django_heroku.settings(locals())
  
  SENDGRID_API_KEY = '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'
  EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  EMAIL_USE_TLS = True
  EMAIL_HOST = 'smtp.sendgrid.net'
  EMAIL_HOST_USER = 'apikey'
  EMAIL_HOST_PASSWORD = SENDGRID_API_KEY
  EMAIL_PORT = 587
  SERVER_EMAIL = 'info@wilpalinternationalogistics.com'
  
  