daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DATABASES = {
  2.     'default': {
  3.         'ENGINE': 'django.db.backends.oracle',
  4.         'NAME': 'Hostname:Port/Service name not SID',  
  5.         'USER': 'Username',                      
  6.         'PASSWORD': 'Password',                                    
  7.     }
  8. }
  9.    
  10. dsn_tns = cx_Oracle.makedsn('Hostname', 'Port',
  11.                              service_name='Service name not SID')
  12. connection = cx_Oracle.connect('Username', 'Password', dsn_tns)
  13.    
  14. DATABASES = {
  15. 'default': {
  16.     'ENGINE': os.environ['DB_ENGINE'],
  17.     'NAME': os.environ['DB_NAME'],
  18.     'HOST': os.environ.get('DB_HOST', 'localhost'),
  19.     'PORT': os.environ.get('DB_PORT', '1521'),
  20.     'USER': os.environ.get('DB_USER', 'user'),
  21.     'PASSWORD': os.environ.get('DB_PASS', "pass")
  22. }
  23.    
  24. DB_NAME=XE
  25. DB_USER=user
  26. DB_PASS=pass
  27. DB_HOST=10.7.0.140 <-- ip host
  28. DB_PORT=1521
  29. DB_ENGINE=django.db.backends.oracle
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top