Opened 8 years ago
Closed 8 years ago
#29223 closed Bug (needsinfo)
Dummy database backend's is_usable() method should return False
| Reported by: | Wagner Macedo | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 2.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
As far as I understood, the dummy database backend in django.db.backends.dummy is used when we set an empty dictionary in DATABASES setting, depicting a not usable database.
So, maybe it's a mistake this backend returns (always) that is usable:
def is_usable(self):
return True
This code can be seen in the repository here.
Change History (2)
comment:1 by , 8 years ago
| Component: | Uncategorized → Database layer (models, ORM) |
|---|---|
| Summary: | Dummy database backend may not informs as usable → Dummy database backend's is_usable() method should return False |
| Type: | Uncategorized → Bug |
comment:2 by , 8 years ago
| Resolution: | → needsinfo |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
That method was added in 25ce177e66fb0e88a39806f5a493e03f1801775a. Looking at Django's current usage if
is_usable(), I don't think changing it for the dummy backend will have any effect. Is your report mostly theoretical?