Changes between Initial Version and Version 1 of Ticket #31558
- Timestamp:
- May 11, 2020, 12:28:33 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31558
- Property Triage Stage Unreviewed → Accepted
- Property Summary Boolean attribute for a property getter of a model doesn’t active the “on/off” icon in the admin site → Support the use of boolean attribute on properties in the admin.
- Property Type Bug → New feature
- Property Version 3.0 → master
-
Ticket #31558 – Description
initial v1 8 8 publication_date = models.DateTimeField('Date of publication') 9 9 10 @property11 10 def was_published_recently(self): 12 11 timenow = timezone.now() … … 14 13 return recent <= self.publication_date <= timenow 15 14 16 was_published_recently.fget.admin_order_field = 'publication_date' 17 was_published_recently.fget.short_description = 'Published Recently?' 18 was_published_recently.fget.boolean = True 15 was_published_recently.admin_order_field = 'publication_date' 16 was_published_recently.short_description = 'Published Recently?' 17 was_published_recently.boolean = True 18 was_published_recently = property(was_published_recently) 19 19 }}} 20 20