You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests don't run on Django 1.5. It says "cannot import MasterSlaveRouter". There is some kind of circularity. When it tries to import multidb.tests.settings, it tries to import multidb.tests first—I think this is normal Python. But then multidb.tests tries to import stuff from multidb, which in turn attempts to read stuff from settings. The error occurs at line 40 of multidb/__init.__.py:
ifgetattr(settings, 'SLAVE_DATABASES'):
Maybe moving settings.py out of directory tests would solve the problem. If my theory is correct, however, what I can't understand is why this manifests itself only with Django 1.5; but it could be some change in the way Django imports settings.
I want to fix this, so advice would be useful.
The text was updated successfully, but these errors were encountered:
aptiko
pushed a commit
to wikical/django-multidb-router
that referenced
this issue
Jun 12, 2013
Tests don't run on Django 1.5. It says "cannot import MasterSlaveRouter". There is some kind of circularity. When it tries to import
multidb.tests.settings
, it tries to importmultidb.tests
first—I think this is normal Python. But thenmultidb.tests
tries to import stuff frommultidb
, which in turn attempts to read stuff from settings. The error occurs at line 40 ofmultidb/__init.__.py
:Maybe moving
settings.py
out of directorytests
would solve the problem. If my theory is correct, however, what I can't understand is why this manifests itself only with Django 1.5; but it could be some change in the way Django imports settings.I want to fix this, so advice would be useful.
The text was updated successfully, but these errors were encountered: