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:
parent
bb8500449b
commit
40809bdee4
|
@ -692,7 +692,7 @@ class ForeignKey(Field):
|
||||||
kwargs['verbose_name'] = kwargs.get('verbose_name', '')
|
kwargs['verbose_name'] = kwargs.get('verbose_name', '')
|
||||||
else:
|
else:
|
||||||
to_field = to_field or to._meta.pk.name
|
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'):
|
if kwargs.has_key('edit_inline_type'):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
Loading…
Reference in New Issue