Ticket #1038: fields.py.diff

File fields.py.diff, 914 bytes (added by Esaj, 19 years ago)
  • django/core/meta/fields.py

     
    690690            to_name = to._meta.object_name.lower()
    691691        except AttributeError: # to._meta doesn't exist, so it must be RECURSIVE_RELATIONSHIP_CONSTANT
    692692            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', '')
    694693        else:
    695694            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', '')
    697696
    698697        if kwargs.has_key('edit_inline_type'):
    699698            import warnings
Back to Top