My work_experience model includes an "is_working" field which is set to true when a user is currently employed at a company. I am using a toggle switch on the front end and would like to update the boolean field value for "is_working" with a click. What logic should I implement to use the toggle in Django?
Toggle switch
HTML
<div style="display:inline-block">
<label>Currently working here?</label>
<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
</div>
Model
class Work_Experience(models.Model):
job_title = models.CharField(max_length=100, null=True, blank=True)
company = models.CharField(max_length=100, null=True, blank=True)
description = models.CharField(max_length=300, null=True, blank=True)
exp_start_date = models.DateField(null=True, blank=True)
exp_end_date = models.DateField(null=True, blank=True)
is_working = models.BooleanField(default=False)