#26197: DEFAULT_DB_ALIAS in settings ----------------------------------------------+-------------------- Reporter: marcinn | Owner: nobody Type: Uncategorized | Status: new Component: Database layer (models, ORM) | Version: 1.9 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------------------+-------------------- This is a reopened issue based on #21211.
DEFAULT_DB_ALIAS should be configured in settings for better code readability in multi-db projects, where "default" database works as a default . The default database is aliased "default". When calling `using()` we must provide name of connection. Passing "default" is not quite readable. I would like to rename "default" to something more precise, clean, readable. I don't want to change behaviour of the Django itself. Just want to rename the alias. Workaround by making "default" connection empty does not work. Django raises an error when connection is not set. Defining "default" with some sqlite db is a bad idea, because something may write to it and error will not be reported. Please make `DEFAULT_DB_ALIAS` configurable in settings. -- Ticket URL: <https://code.djangoproject.com/ticket/26197> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.98b36b580530faf1f85953d81441e14e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.