So I am trying to stand up a Django site that will query my DBs and return reports. I have 5 legacy DBs that need to be imported. I set one as default and ran inspectdb. This one imported correctly and now is all set. I ran inspectdb against the next, got the models but when I click on the link in admin panel I get an error. My default db name is app2, and the second db im working with is cucm. There error says that there is no db at app2.cucm - Why is django trying to go to app2.cucm instead of just going to cucm like it should????? settings.py file
DATABASES = {
'cucm': {
'NAME': 'CUCM'
'ENGINE': 'django.db.backends.mysql',
'USER': 'user'
'PASSWORD': 'PASSWORD'
'HOST': 'IPADDRESS'
'PORT': '111111'
},
'default': {
'NAME': 'app2',
'ENGINE': 'django.db.backends.mysql',
'USER': 'user',
'PASSWORD': 'PASSWORD',
'HOST': 'IPADDRESS',
'PORT': '1111',
},
}
Full error looks like so:
The pathname '/root/IPNV/django-test/src/reports/models.py' of this watch at 0x7fbe145cef50> dir=False > has probably changed and couldn't be updated, so it cannot be trusted anymore. To fix this error move directories/files only between watched parents directories, in this case e.g. put a watch on '/root/IPNV/django-test/src/reports'
I know the syntax is not perfect above, I retyped it quickly. It is worth noting that all the DBs are on the same host. So all the fields for every db are identical except the name
This is the error form the Django admin panel: Exception Value:
(1146, "Table 'app2.CDR' doesn't exist")
I think the problem is in the routing. 'CDR' is a table in cucm db not app2. I have not created any db routing yet. I was hoping the default would work