list_editable will not work for the default ordering field.
|Reported by:||andrepleblanc@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by Alex)
specifying a DateField as list_editable AND in the ordering of a model's Meta causes an error message stating 'Please correct the errors below' but doesn't list any errors.
class TestModel(models.Model): name = models.CharField(max_length=40) birthdate = models.DateField(null=True, blank=True) class Meta: ordering = ('birthdate',) class TestModelAdmin(admin.ModelAdmin): list_display = ('name', 'birthdate') list_editable = ('birthdate', )
the birthdate field cannot actually be edited on the change list, it just shows that unhelpful message. Not sure if this applies to all Field types or not, but definitely DateFields.
Change History (13)
comment:1 Changed 7 years ago by andrepleblanc@…
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:6 Changed 7 years ago by django@…
- Resolution wontfix deleted
- Status changed from closed to reopened
Changed 7 years ago by django
Changed 7 years ago by Will Hardy
comment:10 Changed 7 years ago by kmtracey
- Resolution set to duplicate
- Status changed from reopened to closed