In django by turn off the button edit the value in database to 'NO' on turn on the button change it to 'YES'.

models.py

class AssetOwnerPrivileges(models.Model):
    asset_add = models.CharField(max_length=20,default='YES') 

html

<td>
                                <label class="switch">
                                    <input type="checkbox">
                                    <span class="slider round"></span>
                                </label>
                            </td>