Opened 6 years ago

Closed 6 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


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

Change History (2)

comment:1 Changed 6 years ago by Claude Paroz

Easy pickings: set
Triage Stage: UnreviewedAccepted

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

Resolution: fixed
Status: newclosed

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