当我运行“python manage.py syncdb --all”时,为什么会收到此错误? [英] Why do I get this error when I run "python manage.py syncdb --all"?

查看:219
本文介绍了当我运行“python manage.py syncdb --all”时,为什么会收到此错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

But I didn't succeed to perform the initial database setup

当我运行python manage.py syncdb --all时,为什么会收到此错误?

Why do I get this error when I run "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'


推荐答案

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

The verify_exists parameter for UrlField was deprecated in the 1.3.1 security release and removed in the current Git master (1.5dev). https://docs.djangoproject.com/en/1.4/internals/deprecation/. This makes this version of django-cms incompatible with the current master. I would recommend using a stable Django release such as the latest 1.4 rather than master.

这篇关于当我运行“python manage.py syncdb --all”时,为什么会收到此错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆