Django

Code

Show
Ignore:
Timestamp:
07/27/08 02:22:39 (4 months ago)
Author:
russellm
Message:

Fixed #7913 -- Corrected backwards incompatible parts of [7977] when optgroup handling was added to field choices (Ticket #4412). Thanks to Michael Elsdorfer (miracle2k) for the report and patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/choices/models.py

    r5876 r8102  
    3737>>> s.get_gender_display() 
    3838u'Female' 
     39 
     40# If the value for the field doesn't correspond to a valid choice, 
     41# the value itself is provided as a display value. 
     42>>> a.gender = '' 
     43>>> a.get_gender_display() 
     44u'' 
     45 
     46>>> a.gender = 'U' 
     47>>> a.get_gender_display() 
     48u'U' 
     49 
    3950"""}