1 2 3 4 5 6 7 8 | def madslug(title):
title = title.strip(' ')
name = sub('\s+', '_', title)
name = sub('(?u)\W', '', name)
name = sub('\d', '', name)
name = sub('-+', '-', name)
name = name.lower()
return name
|
More like this
- . by jeremydw 1 year, 9 months ago
- default url routing and shortcut by vicalloy 2 years, 11 months ago
- watermark by dingdongquan 1 year, 4 months ago
- Templatetag to manage GET arguments in template by DimmuR 1 year, 6 months ago
- custom template tag sample by shinyzhu 2 years, 3 months ago
Comments