Ticket #15424: 15424.diff

File 15424.diff, 2.1 KB (added by Karen Tracey, 14 years ago)
  • django/contrib/admin/helpers.py

     
    206206        for form, original in zip(self.formset.initial_forms, self.formset.get_queryset()):
    207207            yield InlineAdminForm(self.formset, form, self.fieldsets,
    208208                self.opts.prepopulated_fields, original, self.readonly_fields,
    209                 model_admin=self.model_admin)
     209                model_admin=self.opts)
    210210        for form in self.formset.extra_forms:
    211211            yield InlineAdminForm(self.formset, form, self.fieldsets,
    212212                self.opts.prepopulated_fields, None, self.readonly_fields,
    213                 model_admin=self.model_admin)
     213                model_admin=self.opts)
    214214        yield InlineAdminForm(self.formset, self.formset.empty_form,
    215215            self.fieldsets, self.opts.prepopulated_fields, None,
    216             self.readonly_fields, model_admin=self.model_admin)
     216            self.readonly_fields, model_admin=self.opts)
    217217
    218218    def fields(self):
    219219        fk = getattr(self.formset, "fk", None)
     
    222222                continue
    223223            if field in self.readonly_fields:
    224224                yield {
    225                     'label': label_for_field(field, self.opts.model, self.model_admin),
     225                    'label': label_for_field(field, self.opts.model, self.opts),
    226226                    'widget': {
    227227                        'is_hidden': False
    228228                    },
  • django/contrib/admin/util.py

     
    249249            else:
    250250                message = "Unable to lookup '%s' on %s" % (name, model._meta.object_name)
    251251                if model_admin:
    252                     message += " or %s" % (model_admin.__name__,)
     252                    message += " or %s" % (model_admin.__class__.__name__,)
    253253                raise AttributeError(message)
    254254
    255255            if hasattr(attr, "short_description"):
Back to Top