Fixed #1038 -- Changed ForeignKey to calculate verbose_name by looking at its field name rather than the model of the related object. Thanks, Esaj

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-02-18 20:44:09 +00:00
parent bb8500449b
commit 40809bdee4
1 changed files with 1 additions and 1 deletions

View File

@ -692,7 +692,7 @@ class ForeignKey(Field):
kwargs['verbose_name'] = kwargs.get('verbose_name', '')
else:
to_field = to_field or to._meta.pk.name
kwargs['verbose_name'] = kwargs.get('verbose_name', to._meta.verbose_name)
kwargs['verbose_name'] = kwargs.get('verbose_name', '')
if kwargs.has_key('edit_inline_type'):
import warnings