title: Update records in a table from views.py with Django
body: <p>so basically, I wanted to know how I can change the value of a single field in Django from views.py itself without needing to use forms.py</p>
  <p>I want to do something like this...</p>
  <pre><code>def driver_dashboard_trip_completed(request, tripId):
      trip = Trip.objects.filter(pk=tripId)
      if trip.exists():
          if trip.first().user.id == request.user.id:
              if trip.first().status == &quot;ACTIVE&quot;:
                  trip.first().status = &quot;COMPLETED&quot;
          else:
              messages.warning(request, &quot;Invalid access (401 - UNAUTHORIZED)&quot;)
      else:
          messages.warning(request, 'Invalid Trip details')
  
      return redirect('driver_dashboard_rides')
  </code></pre>
  <p>But doesn't seem like it works, so is there anything that I am missing out??</p>
  <p>This is my models.py...</p>
  <pre><code>STATUS = [
      ('UPCOMING', 'Upcoming'),
      ('ACTIVE', 'Active'),
      ('COMPLETED', 'Completed')
  ]
  
  class Trip (models.Model):
      user = models.ForeignKey(User, on_delete=models.CASCADE, null=True)
      departure = models.CharField(max_length=200)
      arrival = models.CharField(max_length=200)
      date = models.DateField(validators=[inthe_future])
      time = models.TimeField(default=datetime.now().time())
      vacant_seats = models.PositiveIntegerField()
      vehicle_used = models.ForeignKey(Vehicle, on_delete=models.PROTECT)
      price_per_person = models.IntegerField()
      status = models.CharField(choices=STATUS, default='UPCOMING', max_length=10)
  </code></pre>
  <p>Any help is greatly appreciated thanks!</p>