Ticket #211: edit-inline.diff
File edit-inline.diff, 1.1 KB (added by , 19 years ago) |
---|
-
fields.py
531 540 kwargs['name'] = kwargs.get('name', to_name + '_id') 532 541 kwargs['verbose_name'] = kwargs.get('verbose_name', to._meta.verbose_name) 533 542 rel_name = rel_name or to_name 543 if 'edit_inline_type' in kwargs: 544 kwargs['edit_inline'] = True 534 545 kwargs['rel'] = ManyToOne(to, rel_name, to_field, 535 546 num_in_admin=kwargs.pop('num_in_admin', 3), 536 547 min_num_in_admin=kwargs.pop('min_num_in_admin', None), … … 573 584 kwargs['verbose_name'] = kwargs.get('verbose_name', 'ID') 574 585 to_field = to_field or to._meta.pk.name 575 586 rel_name = rel_name or to._meta.object_name.lower() 587 if 'edit_inline_type' in kwargs: 588 kwargs['edit_inline'] = True 576 589 kwargs['rel'] = OneToOne(to, rel_name, to_field, 577 590 num_in_admin=kwargs.pop('num_in_admin', 0), 578 591 edit_inline=kwargs.pop('edit_inline', False),