Modify existing field in bd



  • I can't figure out how to change other meanings in the field when looking for a certain one.

    user_id = models.AutoField(primary_key=True)
    telefon = models.FloatField(blank=True, null=True)
    confirmation = models.BooleanField(blank=True)
    

    There's this model, the user's turning the number.

    userAditional.objects.filter(telefon=phone_sim)
    

    I'm checking for a bud, and if there's a match to change. Confirmation on TrueI've been doing this through a session, but if the docks are removed, everything's gone. How do you get the rest of the field in the fucking field knowing one thing? Or only user_id to pull.



  • userAditional.objects.filter(telefon=phone_sim).update(confirmation=True)
    

    Set all selected confirmations=True, return the number of new lines (int)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2