Code

Opened 2 years ago

Closed 18 months ago

#18053 closed Bug (duplicate)

empty DATABASES blows up in 1.4

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

Description

In Django 1.3 if we didn't have any databases we had to set DATABASES to {}, but now in 1.4 things blow up with that setting. It would be better if it behaved the same as we can't easily migrate our systems to 1.4. The errors are triggered when a support class or shortcut is used or imported and imports django.db.*.

Attachments (0)

Change History (3)

comment:1 Changed 2 years ago by carljm

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by ptone

Ideally it would be nice to see if this can be fixed by examining the places where db/init is being invoked by import and factor those parts that actually need the db, vs those that don't. IOW see what it would take to allow a truly blank databases setting at the global conf level. The simpler fix would be to special check for a blank databases in db/init and set the dummy backend as in global settings.

comment:3 Changed 18 months ago by claudep

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

See #18575.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.