old_contents: import os
  
  from .settings import *  # noqa
  
  DATABASES = {
      'default': {
          'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
          'NAME': 'dtc',
          },
      }
  
  
  if 'DTC_PG_USERNAME' in os.environ:
      DATABASES['default'].update(
          {
              'USER': os.environ['DTC_PG_USERNAME'],
              'PASSWORD': '',
              'HOST': 'localhost',
              }
          )
  
new_contents: import os
  
  try:
      from psycopg2cffi import compat
      compat.register()
  except ImportError:
      pass
  
  from .settings import *  # noqa
  
  DATABASES = {
      'default': {
          'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
          'NAME': 'dtc',
          },
      }
  
  
  if 'DTC_PG_USERNAME' in os.environ:
      DATABASES['default'].update(
          {
              'USER': os.environ['DTC_PG_USERNAME'],
              'PASSWORD': '',
              'HOST': 'localhost',
              }
          )
  
subject: Enable postgresql CFFI compatability if available.