> The response is something like: > 'Content-Type: text/html; charset=utf-8\n\n[{"pk": 1, "model": > "MyApp.foo", "fields": {"choice_field": "db_name1"}}]'
This is interesting.. But I think the serializer is working properly. the first element in the tuple is the value stored in the database, and second is the human readable version (might be used in a dropdown/ combo box). > I would like to get something like: > 'Content-Type: text/html; charset=utf-8\n\n[{"pk": 1, "model": > "MyApp.foo", "fields": {"choice_field": "Display Name 1"}}]' This (inelegant) solution may work: # change max_length on model to the longest 'display name SAMPLE_CHOICES = (_('Display Name 1'), _('Display Name 1')), (_('Display Name 2'), _('Display Name 2')) ) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.