擅长:python、mysql、java
<p>你有没有试过<code>n.title|slugify</code>看看这是否适合你。</p>
<p>参考号:<a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#slugify" rel="noreferrer">https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#slugify</a></p>
<p><strong>注意:</strong>尽管这是可能的,但请确保“slugified”元素从未用于路由的任何部分。。。(即,仅供展示)</p>