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

Тел: +7 965 3737 888

402

Просмотров

1

Ответов

Slugify alternative

<p>I prefer to use this slugification function rather than the one included with Django. It uses underscores instead of dashes for spaces, and allows dashes and periods to occur normally in the string. I decided on this when considering reasonable slugified titles such as...</p>
object-relational_mapper_2.5
ten_reasons_web-2.0_rocks
django-trunk_0.99_updated

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

Ответы (1):

Ответericmoritz:03.07.2008
Ответ полезен? Да0/Нет0

From what I hear dashes are supposed to be more search engine friendly. According the a Search Engine guy I know, the search engines equate a underscore to be an non-char. So school_closes_due_to_health_issues turns into schoolclosesduetohealthissues.

I take that stuff with a grain of salt though... I think the folks at Google are smart enough to realize folks use underscores as spaces in slugs.

Donno.