Opened 3 years ago

Closed 3 years ago

#18602 closed Cleanup/optimization (fixed)

Misleading error when NAME omitted for Postgres DB

Reported by: Kristian Glass <djangoproject@…> Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Minor issue, but if you don't set a NAME in settings.DATABASES for a db with the postgresql_psycopg2 backend, you get the following error:

You need to specify NAME in your Django settings file.

I've seen this confuse at least two people (resulting in them trying to set settings.NAME...!) so propose a change to:

You need to specify the database NAME in your Django settings file.

in a similar style to the sqlite3 backend.

Pull request at https://github.com/django/django/pull/196

Change History (2)

comment:1 Changed 3 years ago by claudep

  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [828f7b62e8d29f796403606a797d7aec6da98647]:

Fixed #18602 -- Improved error message when database NAME is missing

Thanks Kristian Glass for the report.

Note: See TracTickets for help on using tickets.
Back to Top