Opened 15 years ago

Closed 11 years ago

Last modified 11 years ago

#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 Russell Keith-Magee, 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: UnreviewedSomeday/Maybe

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.

comment:2 by Julien Phalip, 14 years ago

Severity: Normal
Type: New feature

comment:3 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 by Aymeric Augustin, 11 years ago

Resolution: needsinfo
Status: newclosed

This ticket doesn't contain an actionable proposal.

Last edited 11 years ago by Aymeric Augustin (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top