mirror of
https://github.com/django/django.git
synced 2025-08-19 02:01:29 +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:
parent
d2fc8ae0e3
commit
3bd384aa62
5 changed files with 27 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue