Ticket #6755: nfa_modelinheritance.1.diff

File nfa_modelinheritance.1.diff, 546 bytes (added by brosner, 7 years ago)
  • django/db/models/fields/related.py

    diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
    index c825740..26ecb16 100644
    a b class OneToOneField(ForeignKey): 
    695695    """
    696696    def __init__(self, to, to_field=None, **kwargs):
    697697        kwargs['unique'] = True
     698        kwargs['editable'] = False
    698699        if 'num_in_admin' not in kwargs:
    699700            kwargs['num_in_admin'] = 0
    700701        super(OneToOneField, self).__init__(to, to_field, OneToOneRel, **kwargs)
Back to Top