diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 31a28cc..36cfefd 100644
a
|
b
|
class BaseModelAdmin(object):
|
67 | 67 | |
68 | 68 | def __init__(self): |
69 | 69 | self.formfield_overrides = dict(FORMFIELD_FOR_DBFIELD_DEFAULTS, **self.formfield_overrides) |
| 70 | |
| 71 | def formfield_changelist_for_dbfield(self, db_field, **kwargs): |
| 72 | """ |
| 73 | Hook for specifying the form Field instance for a given database Field |
| 74 | instance when using 'list_editable' on the changelist. |
| 75 | |
| 76 | By default, returns formfield_for_dbfield. |
| 77 | """ |
| 78 | return self.formfield_for_dbfield(db_field, **kwargs) |
70 | 79 | |
71 | 80 | def formfield_for_dbfield(self, db_field, **kwargs): |
72 | 81 | """ |
… |
… |
class ModelAdmin(BaseModelAdmin):
|
352 | 361 | Returns a Form class for use in the Formset on the changelist page. |
353 | 362 | """ |
354 | 363 | defaults = { |
355 | | "formfield_callback": curry(self.formfield_for_dbfield, request=request), |
| 364 | "formfield_callback": curry(self.formfield_changelist_for_dbfield, request=request), |
356 | 365 | } |
357 | 366 | defaults.update(kwargs) |
358 | 367 | return modelform_factory(self.model, **defaults) |
… |
… |
class ModelAdmin(BaseModelAdmin):
|
363 | 372 | is used. |
364 | 373 | """ |
365 | 374 | defaults = { |
366 | | "formfield_callback": curry(self.formfield_for_dbfield, request=request), |
| 375 | "formfield_callback": curry(self.formfield_changelist_for_dbfield, request=request), |
367 | 376 | } |
368 | 377 | defaults.update(kwargs) |
369 | 378 | return modelformset_factory(self.model, |