django admin list_display not a callable

class branch(models.Model): name = models.CharField(max_length=10, unique=True) class company_group(models.Model): branch = models.ForeignKey(branch, on_delete=CASCADE) segment = models.ForeignKey(segment, on_delete=CASCADE) class position_control(models.Model): company_group = models.ForeignKey(company_group, on_delete=CASCADE) position = models.ForeignKey(position, on_delete=CASCADE) rank = models.SmallIntegerField() valid = models.BooleanField(default=True) class PositionControlAdmin(admin.ModelAdmin): list_display = (‘company_group__branch’, ‘position’, ‘rank’, ‘valid’) list_filter = (‘company_group__branch’,) I got error <class ‘information.admin.PositionControlAdmin’>: (admin.E108) The value of ‘list_display[0]’ refers to… Read More django admin list_display not a callable

Boolean field update due to another field change in Django Admin

I have model Department like: class Department(models.Model): dep_title = models.CharField(max_length=30, verbose_name=’Title’) dep_description = models.CharField(max_length=100, blank=True, verbose_name=’Description’) dep_status = models.BooleanField(default=False, verbose_name=’Is Active?’) dep_start = models.DateField(verbose_name=’Date of Establishment’) dep_end = models.DateField(blank=True, verbose_name=’Closing Date’, null=True) and DepartmentAdmin: class DepartmentAdmin(admin.ModelAdmin): list_display= (‘dep_title’,’dep_description’,’dep_status’, ‘dep_start’, ‘dep_end’) I want to check dep_end date and if date is expired, set automatically dep_status =… Read More Boolean field update due to another field change in Django Admin