Django

Code

Changeset 1972

Show
Ignore:
Timestamp:
01/14/06 23:55:48 (3 years ago)
Author:
adrian
Message:

magic-removal: Merged to [1971]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/AUTHORS

    r1904 r1972  
    3535    Andreas 
    3636    David Ascher <http://ascher.ca/> 
     37    Arthur <avandorp@gmail.com> 
    3738    James Bennett 
    3839    Paul Bissex <http://e-scribe.com/> 
  • django/branches/magic-removal/django/core/management.py

    r1968 r1972  
    5959    return bool(re.search(r'^\w+$', s)) 
    6060 
    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. 
     65get_rel_data_type = lambda f: (f.get_internal_type() in ('AutoField', 'PositiveIntegerField', 'PositiveSmallIntegerField')) and 'IntegerField' or f.get_internal_type() 
    6566 
    6667def get_sql_create(app): 
  • django/branches/magic-removal/django/db/backends/util.py

    r1636 r1972  
    5353    # "2005-07-29 09:56:00-05" 
    5454    if not s: return None 
     55    if not ' ' in s: return typecast_date(s) 
    5556    d, t = s.split() 
    5657    # Extract timezone information, if it exists. Currently we just throw 
  • django/branches/magic-removal/django/utils/html.py

    r1968 r1972  
    3939 
    4040def 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) 
    4343 
    4444def strip_entities(value): 
  • django/branches/magic-removal/docs/templates.txt

    r1968 r1972  
    669669**New in Django development version.** 
    670670 
    671 Strips whitespace between HTML tags. This includes tab characters and newlines. 
     671Normalizes whitespace between HTML tags to a single space. This includes tab 
     672characters and newlines. 
    672673 
    673674Example usage:: 
     
    681682This example would return this HTML:: 
    682683 
    683     <p><a href="foo/">Foo</a></p> 
    684  
    685 Only space between *tags* is stripped -- not space between tags and text. In 
     684    <p> <a href="foo/">Foo</a> </p> 
     685 
     686Only space between *tags* is normalized -- not space between tags and text. In 
    686687this example, the space around ``Hello`` won't be stripped:: 
    687688