升级1.7.4到django 1.8 south.db.mysql错误,不使用南

时间:2015-04-06 14:07:00

标签: mysql django

尝试从django的1.7.4升级到1.8;但是,当我运行服务器时,我现在得到了

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.

错误消息,但不起作用。我的INSTALLED_APPS中没有'South'。并且不记得在这个项目上曾经使用过南方。我的所有模型实际上都是手动管理的。

我该如何解决这个问题?

由于

[编辑] 正如您将看到的,我有很多“升级”修复程序要做,但仍然不明白为什么它在“南方”失败而我不使用它。

INSTALLED_APPS = (
    'django_admin_bootstrapped',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'bootstrap3',
    'towel',
    'email_registration',
    'visits',
    'django_markdown',
    'debug_toolbar',
    'LessonApp',
    'bootstrap_pagination',
    'django_tables2',
    'util',
    'memcache_admin',
    'twitter_feed',
    'cec_cms',
    'ckeditor',
    'filebrowser',
    'user_profile',
    'eztexting',
    'secure_file',
    'partboard',
)

回溯:

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:171: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"] = SortedDict(parent_columns)

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:193: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"].update(SortedDict(cols))

/usr/local/lib/python2.7/dist-packages/south/modelsinspector.py:20: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
  from django.contrib.contenttypes import generic

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:174: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  extra = SortedDict()

/home/marc/PycharmProjects/CECLessonApp/ckeditor/widgets.py:10: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
  from django.forms.util import flatatt

/usr/local/lib/python2.7/dist-packages/memcache_admin/views.py:22: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.
  mc_client = get_cache(SETTINGS['CACHE'])._cache

/home/marc/PycharmProjects/CECLessonApp/CECLessonApp/urls.py:18: RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will change from True to False in Django 1.9. Set an explicit value to silence this warning.
  url(r'^favicon\.ico$', RedirectView.as_view(url='/static/favicon.ico')),

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:171: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"] = SortedDict(parent_columns)

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:193: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"].update(SortedDict(cols))

/usr/local/lib/python2.7/dist-packages/south/modelsinspector.py:20: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
  from django.contrib.contenttypes import generic

/usr/local/lib/python2.7/dist-packages/django_tables2/tables.py:174: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  extra = SortedDict()

/home/marc/PycharmProjects/CECLessonApp/ckeditor/widgets.py:10: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
  from django.forms.util import flatatt

/usr/local/lib/python2.7/dist-packages/memcache_admin/views.py:22: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.
  mc_client = get_cache(SETTINGS['CACHE'])._cache

/home/marc/PycharmProjects/CECLessonApp/CECLessonApp/urls.py:18: RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will change from True to False in Django 1.9. Set an explicit value to silence this warning.
  url(r'^favicon\.ico$', RedirectView.as_view(url='/static/favicon.ico')),

Performing system checks...

System check identified some issues:

WARNINGS:
visits.Visit.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
        HINT: Use GenericIPAddressField instead.

System check identified 1 issue (0 silenced).
/usr/local/lib/python2.7/dist-packages/south/db/generic.py:9: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends.util import truncate_name

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS

3 个答案:

答案 0 :(得分:9)

我想把问题保留原样,并显示我在这里找到的答案:

pip uninstall South

不确定为什么让南方包引发这种错误,因为我的项目没有使用它!但它似乎解决了我的问题。

答案 1 :(得分:1)

如果您的项目具有南迁移依然存在于“迁移”文件夹中的依赖项,而不是“south_migrations”文件夹

,则会出现此错误

答案 2 :(得分:0)

modules.py中更改:

class Session(models.Model):
    ...
    ip = models.IPAddressField(blank=True)

ip = models.GenericIPAddressField(blank=True, null=False)