[英]django-cms context_processors.media has been deprecated
This below command errors generates when i run my program with this command python manage.py runserver
当我使用此命令运行程序
python manage.py runserver
时,将生成以下命令错误
/usr/local/lib/python2.7/dist-packages/cms/context_processors.py:20: DeprecationWarning:
cms.context_processors.media has been deprecated in favor of
cms.context_processors.cms_settings. Please update your configuration
'configuration', DeprecationWarning)
How to solve this error? 如何解决这个错误?
Follow instructions provided here http://django-cms.readthedocs.org/en/latest/upgrade/3.0.html#cms-context-processors-media . 请按照http://django-cms.readthedocs.org/en/latest/upgrade/3.0.html#cms-context-processors-media中提供的说明进行操作。
Your project probably has settings.py file which contains TEMPLATE_CONTEXT_PROCESSORS
variable (a list of content processors). 您的项目可能具有settings.py文件,其中包含
TEMPLATE_CONTEXT_PROCESSORS
变量(内容处理器的列表)。 This list contains "cms.context_processors.media"
, it should be replaced with "cms.context_processors.cms_settings"
. 此列表包含
"cms.context_processors.media"
,应将其替换为"cms.context_processors.cms_settings"
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.