def _get_current_database():
 if settings.USE_POSTGRES:
  return None
 try:
  return _get_current_client()[settings.DB_NAME]
 except ConnectionFailure:
  if settings.DEBUG_MODE:
   logger.warn('Cannot connect to database.')
   return None
  else:
   raise

def _get_current_database ( ) : if settings . USE_POSTGRES : return None try : return _get_current_client ( ) [ settings . DB_NAME ] except ConnectionFailure : if settings . DEBUG_MODE : logger . warn ( 'Cannot connect to database.' ) return None else : raise
getter for database proxy .