#29992: Error in admin checking list_display items
     Reporter:  gtoffoli         |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.admin    |                  Version:  2.1
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0

Comment (by gtoffoli):

 In my view #29636 correctly identifies the commit at the origin of the
 problem, but doesn't explain the cause.
 My case is very similar but it involves only ''CharField'' and
 ''TextField'', not a field class I defined, nor, for example,
 And, as far as I can understand, these field classes haven't the
 ''__get__'' method at all.

 An excerpt of my code follows

 class Repo(models.Model):
     name = models.CharField(max_length=255, db_index=True,
     description = models.TextField(blank=True, null=True,
 verbose_name=_('short description'))
     state = models.IntegerField(choices=PUBLICATION_STATE_CHOICES,
 default=DRAFT, null=True, verbose_name='publication state')

 class RepoAdmin(admin.ModelAdmin):
     list_display = ('id', 'name', 'slug', 'description', 'repo_type',
 'state', 'user_fullname', 'created', 'modified',)


 and this is an excerpt of the error log:

 <class 'commons.admin.RepoAdmin'>: (admin.E108) The value of
 'list_display[1]' refers to 'name', which is not a callable, an attribute
 of 'RepoAdmin', or an attribute or method on 'commons.Repo'.
 <class 'commons.admin.RepoAdmin'>: (admin.E108) The value of
 'list_display[3]' refers to 'description', which is not a callable, an
 attribute of 'RepoAdmin', or an attribute or method on 'commons.Repo'.


Ticket URL: <https://code.djangoproject.com/ticket/29992#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to