The problem here is with the db router and django system objects. I ran into the same problem with multiple databases and routers. As far as I remember, the problem here is related to auth.permission content types that mix between databases. Syncdb script otherwise tries to create them in all databases, and theb creates a permission content type for some object that is already reserved for the local model.
I have the following
BASE_DB_TYPES = ( 'auth.user', 'auth.group', 'auth.permission', 'sessions.session',
)
and then in the db router:
def db_for_read(self, model, **hints): if hasattr(model, '_meta') and str(model._meta) in BASE_DB_TYPES: return 'base_db'
EDIT
In addition, an exception might say that you are declaring add_somesame permission for your somesame model, and Django will automatically create add_ , delete_ , edit_ for all objects.
Tisho source share