def database_conf_from_url(url):
return {key.upper(): val for key, val in parse_database_url(url)._asdict().items()}<EOL>
Return a django-style database configuration based on ``url``.

:param url: Database URL
:return: Django-style database configuration dict

Example:
>>> conf = database_conf_from_url(
...     'pgsql://joar:hunter2@5monkeys.se:4242/tweets/tweetschema'
...     '?hello=world')
>>> sorted(conf.items())  # doctest: +NORMALIZE_WHITESPACE
[('ENGINE', 'django.db.backends.postgresql_psycopg2'),
 ('HOST', '5monkeys.se'),
 ('NAME', 'tweets'),
 ('PARAMS', {'hello': 'world'}),
 ('PASSWORD', 'hunter2'),
 ('PORT', 4242),
 ('SCHEMA', 'tweetschema'),
 ('USER', 'joar')]