Django's urlify.js ported to Python