Ticket #1038: fields.py.diff
File fields.py.diff, 914 bytes (added by , 19 years ago) |
---|
-
django/core/meta/fields.py
690 690 to_name = to._meta.object_name.lower() 691 691 except AttributeError: # to._meta doesn't exist, so it must be RECURSIVE_RELATIONSHIP_CONSTANT 692 692 assert to == 'self', "ForeignKey(%r) is invalid. First parameter to ForeignKey must be either a model or the string %r" % (to, RECURSIVE_RELATIONSHIP_CONSTANT) 693 kwargs['verbose_name'] = kwargs.get('verbose_name', '')694 693 else: 695 694 to_field = to_field or to._meta.pk.name 696 kwargs['verbose_name'] = kwargs.get('verbose_name', to._meta.verbose_name)695 kwargs['verbose_name'] = kwargs.get('verbose_name', '') 697 696 698 697 if kwargs.has_key('edit_inline_type'): 699 698 import warnings