Changeset 5834
- Timestamp:
- 08/11/07 00:23:19 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/db/backends/postgresql/base.py
r5609 r5834 279 279 Cast all returned strings to unicode strings. 280 280 """ 281 if not s :281 if not s and not isinstance(s, str): 282 282 return s 283 283 return smart_unicode(s) django/trunk/tests/regressiontests/model_regress/models.py
r5803 r5834 11 11 pub_date = models.DateTimeField() 12 12 status = models.IntegerField(blank=True, null=True, choices=CHOICES) 13 misc_data = models.CharField(max_length=100, blank=True) 13 14 14 15 class Meta: … … 31 32 >>> a.get_status_display() is None 32 33 True 34 35 Empty strings should be returned as Unicode 36 >>> a2 = Article.objects.get(pk=a.id) 37 >>> a2.misc_data 38 u'' 33 39 """ 34 40 }
