gpt4 book ai didi

django - 为什么在运行 "python manage.py syncdb --all"时会出现此错误?

转载 作者:行者123 更新时间:2023-12-04 16:54:44 27 4
gpt4 key购买 nike

我正在尝试申请教程 http://docs.django-cms.org/en/2.1.3/getting_started/tutorial.html .

但是我没有成功执行初始数据库设置

为什么在运行“python manage.py syncdb --all”时会出现此错误?

Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 381, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 230, in execute
self.validate()
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "C:\Python27\lib\site-packages\django\core\management\validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 158, in get_app_errors
self._populate()
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 64, in _populate
self.load_app(app_name, True)
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "C:\Python27\lib\site-packages\django_cms-2.2-py2.7.egg\cms\plugins\link\models.py", line 5, in <module>
class Link(CMSPlugin):
File "C:\Python27\lib\site-packages\django_cms-2.2-py2.7.egg\cms\plugins\link\models.py", line 11, in Link
url = models.URLField(_("link"), verify_exists=False, blank=True, null=True)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 1265, in __init__
CharField.__init__(self, verbose_name, name, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 614, in __init__
super(CharField, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'verify_exists'

最佳答案

verify_exists UrlField 的参数在 1.3.1 安全版本中已弃用,并在当前 Git 主版本 (1.5dev) 中删除。 https://docs.djangoproject.com/en/1.4/internals/deprecation/ .这使得这个版本的 django-cms 与当前的 master 不兼容。我建议使用稳定的 Django 版本,例如最新的 1.4 而不是 master。

关于django - 为什么在运行 "python manage.py syncdb --all"时会出现此错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10884053/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com