Django slugify - use text to create html id's, classes, etc

Oscar Brito

From:
Django Utils | Django documentation | Django: "django.utils.text"

Create html strings to use in id and class attributes with:


slugify()

Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace.







Visit www.divhide.com for more informations, contacts and news about Web Development.
See other blog posts at blog.divhide.com.



Divhide purpose is to follow the HTML5 movement and contribute with applications which prove the quality of technology.


Feel free to contact divhide.