madslug

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

  1. . by jeremydw 3 years, 8 months ago
  2. watermark by dingdongquan 3 years, 3 months ago
  3. convert youtube url for iframe, js api by ivanff 1 year, 1 month ago
  4. default url routing and shortcut by vicalloy 4 years, 10 months ago
  5. Templatetag to manage GET arguments in template by DimmuR 3 years, 5 months ago

Comments

(Forgotten your password?)