Ejemplo n.º 1
0
 def new_connection(self, **kwargs):
     connection = self.new_jndi_connection()
     if not connection:
         settings_dict = self.settings_dict
         if settings_dict['NAME'] == '':
             from django.core.exceptions import ImproperlyConfigured
             raise ImproperlyConfigured(
                 "You need to specify DATABASE NAME in your Django settings file.")
         connection = ConnectionManager.connect(self.properties(**kwargs))
     return connection