清理HTML输入的django文本和字符字段。
django-html-cleaner的Python项目详细描述
清理HTML输入的django文本和字符字段。
快速启动
安装django html cleaner:
pip install django-html-cleaner
然后在django项目中通过将django_html_cleaner添加到 你的django设置中的INSTALLED_APPS。
然后使用它:
fromdjango_html_cleaner.modelsimportSanitizedTextField# in a Django modelfield=SanitizedTextField()