Задать вопрос

Тел: +7 965 3737 888

490

Просмотров

0

Ответов

slug_and_slash_to_dash - modified slugify for urls

<p>This filter converts slashes to spaces in a a sting and then slugify's the result. However, it ignores leading and trailing slashes.  For example, it can take something like this:
</p>
/some/url/with-an-existing-slug/
<p>And turn it into this:
</p>
some-url-with-an-existing-slug
<p>The filter was originally written to use the <em>curent</em> url as the disqus_identifier for Disqus comments.  For example:
</p>
{{ request.META.PATH_INFO|slug_and_slash_to_dash }}

Вопрос полезен? Да0/Нет0
file_4183.py(414.0б)
None