我第一次使用django 1.7.1尝试迁移时遇到以下错误。我该怎么调试呢?
mariano@mariano-System-Product-Name:~/PycharmProjects/grupoconsultor-arg$ python manage.py migrate --settings='xxx.settings_dev'
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, 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 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 337, in execute
self.check()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 371, in check
all_issues = checks.run_checks(app_configs=app_configs, tags=tags)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 59, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/model_checks.py", line 28, in check_all_models
errors.extend(model.check(**kwargs))
TypeError: unbound method check() must be called with server instance as first argument (got nothing instead)
答案 0 :(得分:2)
请参阅https://code.djangoproject.com/ticket/22526,
在服务器模型中查找check()方法并更改名称