insert in database that is not the default DJANGO

0

I know that django works with multiple database connections, I need to insert into a database that is not the default, but I get the following error.

ProgrammingError at /api-jde/f59presapi/2279/
(1146, 'Table \'dblocal."oracle"."FPRES"\' doesn\'t exist')

this is the configuration of my settings.py file

DATABASES = {
   'default': {
       'ENGINE': 'django.db.backends.mysql',
       'NAME': 'dblocal',
       'USER': 'root',
       'PASSWORD': '',
       'HOST': '',
       'PORT': '',
   },
   'bd2': {
        'ENGINE': 'django.db.backends.oracle',
        'NAME': 'XXXX',
        'USER': 'oracle',
        'PASSWORD': 'xxxxx',
    },

}

the bd in which I need to insert is the db2 (I'm not putting all the data here but if I have them full), in the created model I have the METa configuration with the following:

class Meta:
        managed = False
        db_table = u'"oracle"."FPRES"'
    
asked by Palomita Yañez Quiroz 01.02.2018 в 02:55
source

0 answers