Changeset 464
- Timestamp:
- 08/10/05 10:40:14 (3 years ago)
- Files:
-
- django/trunk/django/core/defaultfilters.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/defaultfilters.py
r3 r464 55 55 def slugify(value, _): 56 56 "Converts to lowercase, removes non-alpha chars and converts spaces to hyphens" 57 value = re.sub('[^\w\s ]', '', value).strip().lower()57 value = re.sub('[^\w\s-]', '', value).strip().lower() 58 58 return re.sub('\s+', '-', value) 59 59 60 60 def stringformat(value, arg): 61 61 """ … … 63 63 This specifier uses Python string formating syntax, with the exception that 64 64 the leading "%" is dropped. 65 65 66 66 See http://docs.python.org/lib/typesseq-strings.html for documentation 67 67 of Python string formatting
