我試圖將django與SAP Hana DB連接起來。 https://github.com/kapilratnani/django_hana 和 配置settings.py按規定:將Django與SAP Hana連接
'data_source': {
'ENGINE':'django.db.backends.django_hana',# I tried also 'django_hana' or 'hello' with the same results
'NAME': 'IOT',
'USER': 'ALEX',
'PASSWORD': 'PASSWORD',
'HOST': '186.47.255.17',
'PORT': '30015',
}
我得到一個連接錯誤,因爲如果它不能識別引擎:我已經在github上描述安裝後端我得到的如果我在引擎中鍵入'hello',也會出現同樣的錯誤。這是錯誤:
Unhandled exception in thread started by <function wrapper at 0x7fc2a959f0c8>
Traceback (most recent call last):
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/core/checks/model_checks.py", line 28, in check_all_models
errors.extend(model.check(**kwargs))
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/db/models/base.py", line 1172, in check
errors.extend(cls._check_long_column_names())
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/db/models/base.py", line 1587, in _check_long_column_names
connection = connections[db]
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/db/utils.py", line 212, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/django/Env/singolar/lib/python2.7/site-packages/django/db/utils.py", line 135, in load_backend
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.django_hana' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
Error was: No module named django_hana.base
任何想法,爲什麼它不認識引擎?
與MySQL發動機正常工作:「引擎」:「django.db.backends.mysql」, –
發現倉庫支持Django 1.9並解決錯誤: https://github.com/mathebox/django_hana_pyhdb –