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.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e679782c-a7a7-4ac7-9247-2eeb7bd478d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.