Opened 16 years ago
Last modified 13 years ago
#10784 closed
list_editable will not work for the default ordering field. — at Version 3
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 (last modified by )
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.
Change History (3)
comment:1 by , 16 years ago
comment:3 by , 16 years ago
Description: | modified (diff) |
---|
I'm unable to reproduce with:
class Article(models.Model): title = models.CharField(max_length=100) pubdate = models.DateField() class Meta: ordering = ('pubdate',) class ArticleAdmin(admin.ModelAdmin): list_display = ('title', 'pubdate',) list_editable = ('pubdate',)
I'm going to close as worksforme now, if somehow can provide additional information to reproduce it or a testcase for Django's tests feel free to reopen.
sorry, the code didn't come out as I had hoped, but I'm sure the problem is clear.