Re: Support for DATABASES['default'] = {}

2015-02-25 Thread Marten Kenbeek
If the docs state that it is a valid setting, then we shouldn't change that to maintain compatibility and your ticket is indeed a bug. In that case, it makes sense to me not to require the `default` database setting in the first place. The error caused in #24394 is a result of looping over all

Re: Support for DATABASES['default'] = {}

2015-02-25 Thread Thomas Recouvreux
Hello, I have a case where the 'default' database does not have any sense, but I still want the tests to create and manage transactions on other defined databases, so the option `--database` would not help me. I could put something in the default database like in memory sqlite for the tests

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Markus Holtermann
The question I'm asking myself right now: what is a "default" database in a multi database setup where "default" does not make sense at all? I can easily think of a case where I have multiple other databases used by other services where Django provides a dashboard. I don't see any of those

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Marc Tamlyn
I can't see why it is sensible to support an invalid database configuration as the default. If you explicitly want the default to be a dummy, you should configure that IMO. On 24 February 2015 at 14:04, Marten Kenbeek wrote: > Which one? :P This was more intended as a

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Marten Kenbeek
Which one? :P This was more intended as a question than as a proposal. I personally prefer a documentation change and strict checking of `default` if and only if the database configuration is not empty. django.db.connection relies on the default connection, and third-party apps which

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Marc Tamlyn
In that case your proposal sounds perfectly reasonable. On 24 February 2015 at 13:47, Marten Kenbeek wrote: > In fact, DATABASES={} is a valid configuration and merely sets 'default' > as a dummy backend. An exception is only explicitly raised if you supply a > non-empty

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Marten Kenbeek
In fact, DATABASES={} is a valid configuration and merely sets 'default' as a dummy backend. An exception is only explicitly raised if you supply a non-empty setting that does not include `default`. On Tuesday, February 24, 2015 at 2:43:51 PM UTC+1, Marc Tamlyn wrote: > > It would seem more

Re: Support for DATABASES['default'] = {}

2015-02-24 Thread Marc Tamlyn
It would seem more sensible to me to try to support DATABASES={}. There's no reason why a Django site should have to run a database - a microservice using redis or something similar is perfectly reasonable and you could want to use Django for other reasons (e.g. shared templates). Marc On 24

Support for DATABASES['default'] = {}

2015-02-24 Thread Marten Kenbeek
With recent bug reports (#24332 , #24298 and now #24394 ) all caused by setting `DATABASES['default'] = {}`, this makes me wonder if it should be supported