Changeset 1972
- Timestamp:
- 01/14/06 23:55:48 (3 years ago)
- Files:
-
- django/branches/magic-removal/AUTHORS (modified) (1 diff)
- django/branches/magic-removal/django/core/management.py (modified) (1 diff)
- django/branches/magic-removal/django/db/backends/util.py (modified) (1 diff)
- django/branches/magic-removal/django/utils/html.py (modified) (1 diff)
- django/branches/magic-removal/docs/templates.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/AUTHORS
r1904 r1972 35 35 Andreas 36 36 David Ascher <http://ascher.ca/> 37 Arthur <avandorp@gmail.com> 37 38 James Bennett 38 39 Paul Bissex <http://e-scribe.com/> django/branches/magic-removal/django/core/management.py
r1968 r1972 59 59 return bool(re.search(r'^\w+$', s)) 60 60 61 # If the foreign key points to an AutoField, the foreign key should be an 62 # IntegerField, not an AutoField. Otherwise, the foreign key should be the same 63 # type of field as the field to which it points. 64 get_rel_data_type = lambda f: (f.get_internal_type() == 'AutoField') and 'IntegerField' or f.get_internal_type() 61 # If the foreign key points to an AutoField, a PositiveIntegerField or a 62 # PositiveSmallIntegerField, the foreign key should be an IntegerField, not the 63 # referred field type. Otherwise, the foreign key should be the same type of 64 # field as the field to which it points. 65 get_rel_data_type = lambda f: (f.get_internal_type() in ('AutoField', 'PositiveIntegerField', 'PositiveSmallIntegerField')) and 'IntegerField' or f.get_internal_type() 65 66 66 67 def get_sql_create(app): django/branches/magic-removal/django/db/backends/util.py
r1636 r1972 53 53 # "2005-07-29 09:56:00-05" 54 54 if not s: return None 55 if not ' ' in s: return typecast_date(s) 55 56 d, t = s.split() 56 57 # Extract timezone information, if it exists. Currently we just throw django/branches/magic-removal/django/utils/html.py
r1968 r1972 39 39 40 40 def strip_spaces_between_tags(value): 41 "Returns the given HTML with spaces between tags stripped"42 return re.sub(r'>\s+<', '> <', value)41 "Returns the given HTML with spaces between tags normalized to a single space" 42 return re.sub(r'>\s+<', '> <', value) 43 43 44 44 def strip_entities(value): django/branches/magic-removal/docs/templates.txt
r1968 r1972 669 669 **New in Django development version.** 670 670 671 Strips whitespace between HTML tags. This includes tab characters and newlines. 671 Normalizes whitespace between HTML tags to a single space. This includes tab 672 characters and newlines. 672 673 673 674 Example usage:: … … 681 682 This example would return this HTML:: 682 683 683 <p> <a href="foo/">Foo</a></p>684 685 Only space between *tags* is stripped -- not space between tags and text. In684 <p> <a href="foo/">Foo</a> </p> 685 686 Only space between *tags* is normalized -- not space between tags and text. In 686 687 this example, the space around ``Hello`` won't be stripped:: 687 688
