运行Python manage.py runserver时出现PostSyncDb错误(尝试更新至DJango 1.9)

时间:2019-12-13 21:21:08

标签: python django django-signals django-1.9

我正在尝试缓慢地更新django,今天我刚从1.8升级到1.9(我从ImportError: cannot import name post_syncdb开始运行。我确保将信号导入模型,并已实现This Link。还有其他人经历过吗? 这是我尝试python manage.py runserver

时的回溯
(www)ubuntu@prodcopy:/opt/django/www/src$ python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/django/www/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
    utility.execute()
  File "/opt/django/www/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/opt/django/www/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/opt/django/www/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/django/www/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/django/www/src/site_aggrigator/__init__.py", line 2, in <module>
    import management
  File "/opt/django/www/src/site_aggrigator/management/__init__.py", line 6, in <module>
    from django.db.models.signals import post_syncdb
ImportError: cannot import name post_syncdb

0 个答案:

没有答案