반응형
- cx_Oracle 설치
참조
https://gist.github.com/thom-nic/6011715
https://data-rider.blogspot.kr/2016/10/os.html
oracle폴더 생성 후 instantclient basic 과 sdk 설치
(나의 경우 AnacondaProject/oraclestudy에 폴더 생성)
export ORACLE_HOME=/Users/seol/AnacondaProjects/oraclestudy/oracle/instantclient_12_1/
export VERSION=12.1
export ARCH=x86_64
mkdir -p $ORACLE_HOME
cd $ORACLE_HOME
ln -s libclntsh.dylib.12.1 libclntsh.dylib
ln -s libocci.dylib.12.1 libocci.dylib
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME
env ARCHFLAGS="-arch $ARCH" pip install cx_Oracle - settings.py 수정
http://stackoverflow.com/questions/32242947/django-cx-oracle-with-oracle-drcp-connection-pooling
http://codeforaliving.blogspot.kr/2015/02/connecting-django-to-oracle-database.html
http://www.dbatoolz.com/t/setup-python-and-django-with-oracle-on-linux.html
export TNS_ADMIN=/Users/seol/AnacondaProjects/oraclestudy/oracle/instantclient_12_1/
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.oracle',
'NAME': 'MFG',
'USER': 'MAD_USER',
'PASSWORD': 'mfg_crm',
}
} - django 모델로 가져오기
참조
http://antilibrary.org/700
python manage.py inspectdb > polls/model.py
반응형
'개발 > django' 카테고리의 다른 글
로그 백업 방식 (logging - handlers) (0) | 2019.01.22 |
---|---|
Fake (0) | 2019.01.17 |
MacOS에 설치하기 (0) | 2019.01.09 |
ssh root 로그인 제한 (0) | 2017.05.30 |
Django, Python3.6, virtualenv, mod_wsgi, CentOS6.5 (0) | 2017.05.30 |