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

问题描述

我将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 (将#修改为@)