Ticket #7947: 2145-one-to-one-field_editable.diff
File 2145-one-to-one-field_editable.diff, 610 bytes (added by , 16 years ago) |
---|
-
db/models/fields/related.py
704 704 """ 705 705 def __init__(self, to, to_field=None, **kwargs): 706 706 kwargs['unique'] = True 707 kwargs['editable'] = False 707 if kwargs.get('parent_link', False): 708 kwargs.setdefault('editable', False) 708 709 if 'num_in_admin' not in kwargs: 709 710 kwargs['num_in_admin'] = 0 710 711 super(OneToOneField, self).__init__(to, to_field, OneToOneRel, **kwargs)