OiO.lk Blog HTML all users are displayed as “Active” even though they are supposed to be inactive,
HTML

all users are displayed as “Active” even though they are supposed to be inactive,


list.html

<p>Active Status: {% if datas.employee.is_active %}Active{% else %}Inactive{% endif %}</p>

models.py

class Employee(models.Model):

is_active = models.BooleanField(default=True)
def delete(self):
    self.is_active = True
    self.save()
)



You need to sign in to view this answers

Exit mobile version