Changeset 5312
- Timestamp:
- 05/21/07 19:46:08 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode/tests/regressiontests/string_lookup/models.py
r5205 r5312 4 4 class Foo(models.Model): 5 5 name = models.CharField(maxlength=50) 6 viking= models.CharField(maxlength=50, blank=True)6 friend = models.CharField(maxlength=50, blank=True) 7 7 8 8 def __unicode__(self): … … 72 72 # Regression tests for #3937: make sure we can use unicode characters in 73 73 # queries. 74 # BUG: These tests fail on MySQL, but it's a problem with the test setup. A 75 # properly configured UTF-8 database can handle this. 74 76 75 >>> fx = Foo(name='Bjorn', viking=u'Freydís Eiríksdóttir')77 >>> fx = Foo(name='Bjorn', friend=u'François') 76 78 >>> fx.save() 77 >>> Foo.objects.get( viking__contains=u'\xf3')79 >>> Foo.objects.get(friend__contains=u'\xe7') 78 80 <Foo: Foo Bjorn> 79 81 80 82 # We can also do the above query using UTF-8 strings. 81 >>> Foo.objects.get( viking__contains='\xc3\xb3')83 >>> Foo.objects.get(friend__contains='\xc3\xa7') 82 84 <Foo: Foo Bjorn> 83 85 """}
