Django 1.4: работа с South - Python
Формулировка задачи:
установил South 0.7.1
прописал его в settings.py
но при синхронизации получаю такую ошибку
что я делаю не так?
Листинг программы
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': '/home/django-projects/ilnurgi_ru/apps/bazadan.db',
- '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.
- }
- }
- INSTALLED_APPS = (
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.sites',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'apps.blog',
- 'django.contrib.admin',
- 'south',
- )
Листинг программы
- # python manage.py syncdb
- Traceback (most recent call last):
- File "manage.py", line 10, in <module>
- execute_from_command_line(sys.argv)
- File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
- utility.execute()
- File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
- self.fetch_command(subcommand).run_from_argv(self.argv)
- File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 261, in fetch_command
- klass = load_command_class(app_name, subcommand)
- File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 69, in load_command_class
- module = import_module('%s.management.commands.%s' % (app_name, name))
- File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
- __import__(name)
- File "/usr/local/lib/python2.7/dist-packages/south/management/commands/syncdb.py", line 5, in <module>
- from south import migration
- File "/usr/local/lib/python2.7/dist-packages/south/migration.py", line 17, in <module>
- from south.db import db
- File "/usr/local/lib/python2.7/dist-packages/south/db/__init__.py", line 9, in <module>
- module_name = '.'.join(['south.db', settings.DATABASE_ENGINE])
- File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 185, in inner
- return func(self._wrapped, *args)
- AttributeError: 'Settings' object has no attribute 'DATABASE_ENGINE'
Решение задачи: «Django 1.4: работа с South»
textual
Листинг программы
- ./manage.py dbshell
- #возможно попросит пароль от БД
- SELECT {имя интересующего столбца} FROM {таблица};
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д