#32792: admin.display decorator boolean flag not working with @property -----------------------------------------+------------------------ Reporter: Ron | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: 3.2 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -----------------------------------------+------------------------ Hi guys,
I really hope that I'm not missing anything. I have a model with a boolean property I'd like to show in my admin list view: {{{ class MyModel(models.Model): .... @property @admin.display(description=_('Is external'), boolean=True) def is_external(self): return bool(self.requested_external) }}} My admin column shows True and False strings instead of the green and red icons. When I remove the property decorator, it works as expected. I double-checked the docs but couldn't find any note about not using it with properties. Thanks! -- Ticket URL: <https://code.djangoproject.com/ticket/32792> 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/049.052c0a059517dbac661f00c7a214909e%40djangoproject.com.