#10784: list_editable will not work for the default ordering field. ----------------------------------------------+----------------------------- Reporter: andreplebl...@gmail.com | Owner: nobody Status: new | Milestone: Component: django.contrib.admin | Version: SVN Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ----------------------------------------------+----------------------------- Old 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. New 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. {{{ #!python 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. Comment (by Alex): 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. -- Ticket URL: <http://code.djangoproject.com/ticket/10784#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---