#13412 closed New feature (needsinfo)
Exposing multiple db in admin interface is limited
Reported by: | idle sign | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.2-beta |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Someday/Maybe | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Suppose I have Django driven site with two applications using two different dbs.
Documentation at http://docs.djangoproject.com/en/dev/topics/db/multi-db/ gives us an idea of how to expose multiple dbs to admin interface.
However four admin.ModelAdmin methods customized in the example do not handle list_filter option (so query hits the default db, and that rises an exception).
For now I've found only one working solution - using custom manager with overriden get_query_set() method.
Change History (5)
comment:1 by , 15 years ago
Summary: | Exposing multiple db in admin interface is limited (list_filter support) → Exposing multiple db in admin interface is limited |
---|---|
Triage Stage: | Unreviewed → Someday/Maybe |
comment:2 by , 13 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:5 by , 11 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
This ticket doesn't contain an actionable proposal.
The documentation says that the admin doesn't have explicit support for multiple databases. Adding explicit support is an area for improvement.
Using routers, it should be possible to use multi-db and the admin for many use cases (in particular, master-slave replication). There will certainly be use cases that admin will have difficulty with.
I'll leave this open as a someday/maybe ticket, given that this is a documented limitation. However, This is something that will need a specific proposal in order to go further.