Categories Uncategorized

My First Contribution to Django


about 2 weeks ago I created a multilingual version slugify for django! You can find the code here.

What is slugify? It the function that gets us from “This is my post” to “this-is-my-post” and its used widely on the web to make human friendly URLs, where the data are not accessed by their numerical ID but by the human readable “slug”.

Django provides a function to automatically create the slug from a phrase. However that only worked for English characters. Any extended character in unicode was ignored, which resulted in empty slugs if the language was other than English.

The “downcode” function I provided maps characters in other languages to English ones. Which allows to use the slygify function that comes with Django!

About the author