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:
Malcolm Tredinnick 2009-04-11 07:41:59 +00:00
parent d2fc8ae0e3
commit 3bd384aa62
5 changed files with 27 additions and 5 deletions

View file

@ -169,7 +169,7 @@ class PersonAdmin(admin.ModelAdmin):
list_display = ('name', 'gender', 'alive')
list_editable = ('gender', 'alive')
list_filter = ('gender',)
search_fields = ('name',)
search_fields = (u'name',)
ordering = ["id"]
class Persona(models.Model):