title: Django - Update one fields value automatically after a value change
body: <p>I am new to django and I have a simple question. I have two model: Model RegisterLogin and Model OtpEmailVerify. I wanna make 'is_verified' field of Model OtpEmailVerify 'True' as long as 'otp_no' provided matches with the 'otp' field of model LoginRegister.</p>
  <p><strong>models.py</strong></p>
  <pre><code>class RegisterLogin(AbstractUser):
  id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
  created_date = models.DateTimeField(auto_now_add=True)
  updated_date = models.DateTimeField(auto_now_add=True)
  email = models.EmailField(unique=True)
  first_name = models.CharField(max_length=100, blank=False)
  last_name = models.CharField(max_length=100, blank=False)
  phone_regex = RegexValidator(regex=r'\+?1?\d{9,15}$',
                               message=&quot;Phone number must be entered in the format: '+999-999999'. Up to 15 digits allowed.&quot;)
  phone_number = models.CharField(validators=[phone_regex], max_length=15, blank=False, unique=True)
  sign_up_for_newspaper = models.BooleanField(default=False)
  allow_remote_shopping_assistance = models.BooleanField(default=False)
  otp = models.CharField(null=False, unique=False, max_length=5)
  
  username = None
  USERNAME_FIELD = 'email'
  REQUIRED_FIELDS = ['first_name', 'phone_number']
  
  def __str__(self):
      return self.email
  
  def save(self, *args, **kwargs):
      otp_choice = '1234567890'
      for i in range(5):
          self.otp += str(random.choice(otp_choice))
      super(RegisterLogin, self).save()
  
  class OtpEmailVerify(models.Model):
  id = models.UUIDField(primary_key=True, default=uuid.uuid4)
  otp_no = models.IntegerField(default=0, help_text='Please enter the Otp that has been sent for '
                                                    'verification ')
  user = models.OneToOneField(RegisterLogin, null=False, on_delete=models.CASCADE)
  is_verified = models.BooleanField(default=False,
                                    help_text='if it is true, that means can now validate otp for verification')
  
  def __str__(self):
      return self.otp_no
  
  def save(self, *args, **kwargs):
      if self.otp_no == self.user.otp:
          return not self.is_verified
      else:
          return ValidationError('Wrong Otp Provided.')
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>class OtpVerifyView(generics.CreateAPIView):
  queryset = OtpEmailVerify.objects.all()
  serializer_class = OtpEmailVerifySerializer
  </code></pre>
  <p><strong>serializer.py</strong></p>
  <pre><code>class OtpEmailVerifySerializer(serializers.ModelSerializer):
  class Meta:
      model = OtpEmailVerify
      fields = '__all__'
      extra_kwargs = {
          'id': {'read_only': True},
          'is_verified': {'read_only': True},
      }
  </code></pre>