title: Editing columns and sending data to database from views.py Django
body: <p>my problem is that I can't make query directly in my views.py. I am writing app that allows user to take the test. But problem is that when I send filled form from the test page to my views.py and call <code>form.save()</code>, the query is not made in the exact moment, so I can't edit this query in the next lines of code. Is there any way that I could get around this? Some kind of form.send?
  Below is my code 
  <strong>views.py:</strong></p>
  
  <pre><code>if form is valid:
      form.save()     #i send data to DB
      choiceIndex = Choice.objects.latest('id').id
      choice = Choice.objects.get(pk=choiceIndex)
      choice.user = Users.objects.get(name=username)
      choice.save()   #i want to edit column made earlier
      return redirect("detail", question_id)         
  </code></pre>
  
  <p><strong>models.py:</strong></p>
  
  <pre><code>class Choice(models.Model):
      user = models.ForeignKey(Users, null=True, on_delete=models.CASCADE)
      question = models.ForeignKey(Questions, null=True,  on_delete=models.CASCADE)
      answer = models.CharField(null=True,max_length=50)
  </code></pre>