Opened 11 years ago

Closed 11 years ago

#20802 closed Bug (invalid)

List filter in admin with multidatabase setup uses default db

Reported by: engrost@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.6-beta-1
Severity: Normal Keywords:
Cc: engrost@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When Adding List filter to Multidb Admin model query for filter is done to default db.

The MultiDBModelAdmin is just from django multi db documentation:

from django.contrib import admin
from .models import UserData
from rte_utilities.admin import MultiDBModelAdmin

class UserDataAdmin(MultiDBModelAdmin):

using = 'userdata'


list_display = ('rte_user', 'key_slug', 'data_size', 'created', 'updated')
list_filter = ('key_slug',)#comment this line and it works no problem


admin.site.register(UserData, UserDataAdmin)

the error and stack trace included

ProgrammingError: (1146, "Table '..in default database...' doesn't exist")

Attachments (1)

stacktrace.txt (7.0 KB ) - added by engrost@… 11 years ago.
Stack trace throwing error

Download all attachments as: .zip

Change History (2)

by engrost@…, 11 years ago

Attachment: stacktrace.txt added

Stack trace throwing error

comment:1 by Ramiro Morales, 11 years ago

Resolution: invalid
Status: newclosed

There is no MultiDBModelAdmin in Django code. If it's part of an external project please report the issue to its bug tracker.

Note: See TracTickets for help on using tickets.
Back to Top