diff --git a/dj_database_url.py b/dj_database_url.py index 7805aa0..58d7ed6 100644 --- a/dj_database_url.py +++ b/dj_database_url.py @@ -53,6 +53,11 @@ def parse(url): path = url.path[1:] path = path.split('?', 2)[0] + # if we are using sqlite and we have no path, then assume we + # want an in-memory database (this is the behaviour of sqlalchemy) + if url.scheme == 'sqlite' and path == '': + path = ':memory:' + # Update with environment configuration. config.update({ 'NAME': path,