Django

Code

Changeset 5243

Show
Ignore:
Timestamp:
05/14/07 16:58:01 (1 year ago)
Author:
mtredinnick
Message:

unicode: Added test to verify fix of #3492.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/tests/modeltests/many_to_one/models.py

    r5185 r5243  
    155155[<Article: John's second story>, <Article: This is a test>] 
    156156 
     157# And should work fine with the unicode that comes out of 
     158# newforms.Form.cleaned_data 
     159>>> Article.objects.filter(reporter__first_name__exact='John').extra(where=["many_to_one_article__reporter.last_name='%s'" % u'Smith']) 
     160[<Article: John's second story>, <Article: This is a test>] 
     161 
    157162# Find all Articles for the Reporter whose ID is 1. 
    158 # Use direct ID check, pk check, and object comparison  
     163# Use direct ID check, pk check, and object comparison 
    159164>>> Article.objects.filter(reporter__id__exact=1) 
    160165[<Article: John's second story>, <Article: This is a test>]