django+mysql='DatabaseWrapper' object has no attribute 'Database' error

前端 未结 2 642
别那么骄傲
别那么骄傲 2021-01-24 01:51

I\'ve just installed Python 3.3.0, mysql-connector and Django. Then I created my first application called mysite. In settings.py

2条回答
  •  不知归路
    2021-01-24 02:37

    I had same error for Django 1.8.9, Python 3.6.12. And I was using django-transaction-hooks==0.2. And my DATABASES settings were

    DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        .
        .
    

    I fixed the issue by using DATABASES settings as follows

    DATABASES = {
    'default': {
        'ENGINE': 'transaction_hooks.backends.mysql',
        .
        .
    

提交回复
热议问题