[quote]Django supports Oracle Database Server versions 9i and higher. Oracle version 10g or later is required to use Django's regex and iregex query operators. You will also need the cx_Oracle driver, version 4.3.1 or newer.[/quote]
gentoo portage中没有cx_Oracle,所有要自己创建cxoracle.ebuild
创建ebuild具体方法-A2
../settings.py
如有以下error出现,请安装最新版的cx_Oracle
参考资料:
A1. [url=http://docs.djangoproject.com/en/dev/ref/databases/?from=olddocs#id9]docs.djangoproject.com[/url]
A2. 由于http://zh.gentoo-wiki.com 暂时不能访问,先参考这个:[url=http://blog.chinaunix.net/u2/63996/showart_725950.html]HOWTO Write Ebuilds[/url]
A3. [url=http://marlgl.iteye.com/admin/blogs/255581]linux 环境下连接Oracle[/url]
附件: cxoracle-4.3.1.ebulid
gentoo portage中没有cx_Oracle,所有要自己创建cxoracle.ebuild
创建ebuild具体方法-A2
ebuild cxoracle-4.3.1.ebuild digest
echo "dev-python/cxoracle ~x86" >> /etc/portage/package.keywords
emerge -av cxoracle
../settings.py
DATABASE_ENGINE = 'oracle'
DATABASE_NAME = 'orcl'
DATABASE_USER = 'username'
DATABASE_PASSWORD = 'password'
DATABASE_HOST = 'hostname'
DATABASE_PORT = '1521'
如有以下error出现,请安装最新版的cx_Oracle
$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "//usr/lib/python2.5/site-packages/django/core/management
/__init__.py", line 340, in execute_manager
utility.execute()
...
File "//usr/lib/python2.5/site-packages/django/db/backends/
oracle/introspection.py", line 13, in DatabaseIntrospection
cx_Oracle.NCLOB: 'TextField',
AttributeError: 'module' object has no attribute 'NCLOB'
参考资料:
A1. [url=http://docs.djangoproject.com/en/dev/ref/databases/?from=olddocs#id9]docs.djangoproject.com[/url]
A2. 由于http://zh.gentoo-wiki.com 暂时不能访问,先参考这个:[url=http://blog.chinaunix.net/u2/63996/showart_725950.html]HOWTO Write Ebuilds[/url]
A3. [url=http://marlgl.iteye.com/admin/blogs/255581]linux 环境下连接Oracle[/url]
附件: cxoracle-4.3.1.ebulid