Ticket #2508: custom_edit_inline_class.diff

File custom_edit_inline_class.diff, 942 bytes (added by jkocherhans, 18 years ago)

patch against [3545]

  • django/contrib/admin/templatetags/admin_modify.py

     
    160160        context.push()
    161161        if relation.field.rel.edit_inline == models.TABULAR:
    162162            bound_related_object_class = TabularBoundRelatedObject
     163        elif relation.field.rel.edit_inline == models.STACKED:
     164            bound_related_object_class = StackedBoundRelatedObject
    163165        else:
    164             bound_related_object_class = StackedBoundRelatedObject
     166            bound_related_object_class = relation.field.rel.edit_inline
    165167        original = context.get('original', None)
    166168        bound_related_object = relation.bind(context['form'], original, bound_related_object_class)
    167169        context['bound_related_object'] = bound_related_object
Back to Top