

def value_to_string(self, obj):
    if (not obj):
        if ((not self.blank) and self.choices):
            choice_list = self.get_choices_default()
            if (len(choice_list) == 2):
                return smart_text(choice_list[1][0])
    return Field.value_to_string(self, obj)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py ForeignKey.value_to_string/original