mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #10645 -- Added some robustness around some admin and modelform params.
Fieldset dictionary names, search fields and unique_together attribute names all have to be convertible to strings (that has always been true). If somebody passes in a unicode object, Python barfs because Django uses those values as keyword argument names and function calls require parameter names to be str objects. We now convert thing to strs automatically. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -11,7 +11,7 @@ class Triple(models.Model):
|
||||
return u"%d, %d, %d" % (self.left, self.middle, self.right)
|
||||
|
||||
class Meta:
|
||||
unique_together = (('left', 'middle'), ('middle', 'right'))
|
||||
unique_together = (('left', 'middle'), (u'middle', u'right'))
|
||||
|
||||
class FilePathModel(models.Model):
|
||||
path = models.FilePathField(path=os.path.dirname(__file__), match=".*\.py$", blank=True)
|
||||
|
||||
Reference in New Issue
Block a user