Opened 16 years ago
Last modified 13 years ago
#10784 closed
list_editable will not work for the default ordering field. — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
eg.
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.