开发者

Django slugify text input

开发者 https://www.devze.com 2023-03-14 16:03 出处:网络
How do I take the value entered in a textbox and slugify it before sending it though the form? This doesn\'t work:

How do I take the value entered in a textbox and slugify it before sending it though the form? This doesn't work:

<input type="text" value="{{something|slugify}}开发者_如何学C" />


Use JavaScript, or add a clean_FOO method to your form to sanitise (slugify in your case) your input data.

0

精彩评论

暂无评论...
验证码 换一张
取 消