def build_dsn_string(db_settings):
    """
    This function parses the Django database configuration in settings.py and
    returns a string DSN (https://en.wikipedia.org/wiki/Data_source_name) for
    a PostgreSQL database
    """
    return "postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}".format(**db_settings)