0
私は仕事をするために南にしようとしていますが、いつもエラーが出ます。私は厳密にチュートリアルに従っています。南、django 1.2、supports_transactionエラー
私は単純なナイトモデルを作って、APPSでは南とsyncdbを実行しますが、sth(テストアプリケーション)は実行しません。
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
# 'whatever.sth',
'south',
# 'sth',
)
私が 'STH' からコメントを削除し、実行します。
[email protected]:~/projectdir/whatever$ python manage.py schemamigration sth --initial
Creating migrations directory at '/pathtoproject/whatever/sth/migrations'...
Creating __init__.py in '/pathtoproject/whatever/sth/migrations'...
+ Added model sth.Knight
Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate sth
と今の移行:settings.pyで
[email protected]:~/pathtoproject/whatever$ python manage.py migrate sth
Running migrations for sth:
- Migrating forwards to 0001_initial.
> sth:0001_initial
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/lib/pymodules/python2.7/south/south/management/commands/migrate.py", line 107, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/lib/pymodules/python2.7/south/south/migration/__init__.py", line 219, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/lib/pymodules/python2.7/south/south/migration/migrators.py", line 235, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/lib/pymodules/python2.7/south/south/migration/migrators.py", line 310, in migrate_many
result = self.migrate(migration, database)
File "/usr/lib/pymodules/python2.7/south/south/migration/migrators.py", line 133, in migrate
result = self.run(migration)
File "/usr/lib/pymodules/python2.7/south/south/migration/migrators.py", line 104, in run
if not south.db.db.has_ddl_transactions:
File "/usr/lib/pymodules/python2.7/south/south/db/generic.py", line 29, in __get__
res = instance.__dict__[self.func.__name__] = self.func(instance)
File "/usr/lib/pymodules/python2.7/south/south/db/generic.py", line 110, in has_ddl_transactions
if connection.features.supports_transactions:
AttributeError: 'DatabaseFeatures' object has no attribute 'supports_transactions'
私のデシベルの設定は次のとおりです。
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '/pathtoproject/whatever/db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
誰でも何が間違っているのか教えていただけますか?