Hi all,
I'm using Django 1.8.1 with some models on a legacy DB. They all are in the same app, so the router is simple:
class MyRouter(object):
MYAPP = 'pkmain'
def db_for_read(self, model, **hints):
if model._meta.app_label == self.MYAPP:
return 'other_db'
return None
And similar for other Router methods. Everything works fine but the View on site in the admin. The model implements:
def get_absolute_url(self):
return 'http://example.com/{}'.format(self.id)
The View on site returns:
OperationalError at /admin/r/1/8461424/
no such table: <mytable>
It seems to be looking for mytable in the wrong database. Suggestions?
Regards.