Ticket #7947: 7947-one-to-one-field_editable.diff
File 7947-one-to-one-field_editable.diff, 610 bytes (added by , 16 years ago) |
---|
-
db/models/fields/related.py
747 747 """ 748 748 def __init__(self, to, to_field=None, **kwargs): 749 749 kwargs['unique'] = True 750 kwargs['editable'] = False 750 if kwargs.get('parent_link', False): 751 kwargs.setdefault('editable', False) 751 752 if 'num_in_admin' not in kwargs: 752 753 kwargs['num_in_admin'] = 0 753 754 super(OneToOneField, self).__init__(to, to_field, OneToOneRel, **kwargs)