--- django/newforms/models.py.orig	2007-06-19 00:00:29.000000000 -0400
+++ django/newforms/models.py	2007-06-19 00:14:02.000000000 -0400
@@ -107,14 +107,14 @@
     return type('FormForFields', (BaseForm,), {'base_fields': fields})
 
 class QuerySetIterator(object):
-    def __init__(self, queryset, empty_label, cache_choices):
-        self.queryset, self.empty_label, self.cache_choices = queryset, empty_label, cache_choices
+    def __init__(self, queryset, empty_label, cache_choices, func):
+        self.queryset, self.empty_label, self.cache_choices, self.func = queryset, empty_label, cache_choices, func
 
     def __iter__(self):
         if self.empty_label is not None:
             yield (u"", self.empty_label)
         for obj in self.queryset:
-            yield (obj._get_pk_val(), str(obj))
+            yield (obj._get_pk_val(), self.func(obj))
         # Clear the QuerySet cache if required.
         if not self.cache_choices:
             self.queryset._result_cache = None
@@ -124,10 +124,11 @@
     # This class is a subclass of ChoiceField for purity, but it doesn't
     # actually use any of ChoiceField's implementation.
     def __init__(self, queryset, empty_label=u"---------", cache_choices=False,
-            required=True, widget=Select, label=None, initial=None, help_text=None):
+            required=True, widget=Select, label=None, initial=None, help_text=None, func = lambda obj: str(obj)):
         self.queryset = queryset
         self.empty_label = empty_label
         self.cache_choices = cache_choices
+        self.func = func
         # Call Field instead of ChoiceField __init__() because we don't need
         # ChoiceField.__init__().
         Field.__init__(self, required, widget, label, initial, help_text)
@@ -144,7 +145,7 @@
         # *each* time _get_choices() is called (and, thus, each time
         # self.choices is accessed) so that we can ensure the QuerySet has not
         # been consumed.
-        return QuerySetIterator(self.queryset, self.empty_label, self.cache_choices)
+        return QuerySetIterator(self.queryset, self.empty_label, self.cache_choices, self.func)
 
     def _set_choices(self, value):
         # This method is copied from ChoiceField._set_choices(). It's necessary
@@ -168,9 +169,9 @@
     "A MultipleChoiceField whose choices are a model QuerySet."
     hidden_widget = MultipleHiddenInput
     def __init__(self, queryset, cache_choices=False, required=True,
-            widget=SelectMultiple, label=None, initial=None, help_text=None):
+            widget=SelectMultiple, label=None, initial=None, help_text=None, func = lambda obj: str(obj)):
         super(ModelMultipleChoiceField, self).__init__(queryset, None, cache_choices,
-            required, widget, label, initial, help_text)
+            required, widget, label, initial, help_text, func)
 
     def clean(self, value):
         if self.required and not value:
