﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31558	Boolean attribute for a property getter of a model doesn’t active the “on/off” icon in the admin site	Alexandre Poitevin	nobody	"Example (adapted from the polls tutorial):
{{{
class Question(models.Model):

    DEFINITION_OF_RECENT = {""days"": 1}

    text = models.CharField(max_length=255)
    publication_date = models.DateTimeField('Date of publication')

    @property
    def was_published_recently(self):
        timenow = timezone.now()
        recent = timenow - timedelta(**self.DEFINITION_OF_RECENT)
        return recent <= self.publication_date <= timenow

    was_published_recently.fget.admin_order_field = 'publication_date'
    was_published_recently.fget.short_description = 'Published Recently?'
    was_published_recently.fget.boolean = True
}}}

There is no problem with `short_description` nor `admin_order_filed`, but `boolean` does not act as expected.

(I hesitated between Bug and New feature for this ticket…)"	Bug	new	contrib.admin	3.0	Normal				Unreviewed	0	0	0	0	0	0
