微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

标记已弃用的问题,发现兼容的纺织品

如何解决标记已弃用的问题,发现兼容的纺织品

我将Django项目更新为最新版本,因为不推荐使用Django标记,因此我将其替换为django-markup-deprecated

这会引发python缺少纺织品的错误

File "/home/sam/code/envs/kpsga/lib/python3.8/site-packages/markup_deprecated/templatetags/markup.py",line 27,in textile
    raise template.TemplateSyntaxError("Error in 'textile' filter: The Python textile library isn't installed.")
django.template.exceptions.TemplateSyntaxError: Error in 'textile' filter: The Python textile library isn't installed.
[28/Oct/2020 14:15:29] "GET / HTTP/1.1" 500 166483

所以我试图以这种方式安装pip install textile,该方法无法正常工作,并引发了另一个不兼容问题

File "/home/sam/code/envs/kpsga/lib/python3.8/site-packages/markup_deprecated/templatetags/markup.py",line 30,in textile
    return mark_safe(force_text(textile.textile(force_bytes(value),encoding='utf-8',output='utf-8')))
TypeError: textile() got an unexpected keyword argument 'encoding'
[28/Oct/2020 14:18:31] "GET / HTTP/1.1" 500 160593

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。