I am working on a problem where I need to change the value of a model field "verified" on button click and redirect it to mail url so the the verified users get mail. I am not familiar with ajax. Please help me out in doing this.
models.py:
class UserProfile(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE, default=None, null=True)
role = models.CharField(max_length=50, choices=Roles, default='client')
verified =models.BooleanField(default = False,blank=True)
template:
<td>
< a class="btn btn-primary"><i class="feather icon-edit mr-1">Verify</i></a>
<a class="btn btn-primary"><i class="feather icon-trash-2">Delete</a>
</td>