Ticket #15424: 15424.diff
File 15424.diff, 2.1 KB (added by , 14 years ago) |
---|
-
django/contrib/admin/helpers.py
206 206 for form, original in zip(self.formset.initial_forms, self.formset.get_queryset()): 207 207 yield InlineAdminForm(self.formset, form, self.fieldsets, 208 208 self.opts.prepopulated_fields, original, self.readonly_fields, 209 model_admin=self. model_admin)209 model_admin=self.opts) 210 210 for form in self.formset.extra_forms: 211 211 yield InlineAdminForm(self.formset, form, self.fieldsets, 212 212 self.opts.prepopulated_fields, None, self.readonly_fields, 213 model_admin=self. model_admin)213 model_admin=self.opts) 214 214 yield InlineAdminForm(self.formset, self.formset.empty_form, 215 215 self.fieldsets, self.opts.prepopulated_fields, None, 216 self.readonly_fields, model_admin=self. model_admin)216 self.readonly_fields, model_admin=self.opts) 217 217 218 218 def fields(self): 219 219 fk = getattr(self.formset, "fk", None) … … 222 222 continue 223 223 if field in self.readonly_fields: 224 224 yield { 225 'label': label_for_field(field, self.opts.model, self. model_admin),225 'label': label_for_field(field, self.opts.model, self.opts), 226 226 'widget': { 227 227 'is_hidden': False 228 228 }, -
django/contrib/admin/util.py
249 249 else: 250 250 message = "Unable to lookup '%s' on %s" % (name, model._meta.object_name) 251 251 if model_admin: 252 message += " or %s" % (model_admin.__ name__,)252 message += " or %s" % (model_admin.__class__.__name__,) 253 253 raise AttributeError(message) 254 254 255 255 if hasattr(attr, "short_description"):