I am trying to build an order tracker using django, to track the delivery status and location of a order made by a buyer. i have a model that look like this
class OrderTracker(models.Model):
order_item = models.ForeignKey('store.CartOrderItem', on_delete=models.SET_NULL, null=True, related_name="cartorderitem_tracker")
status = models.CharField(max_length=5000, null=True, blank=True)
location = models.CharField(max_length=5000, null=True, blank=True)
activity = models.CharField(max_length=5000, null=True, blank=True)
date= models.DateField(auto_now_add=True)
def __str__(self):
return self.order_item
When an order gets placed, the status of the OrderTracker
changes to shipping.
How do i update the location with the current location where the order is crrently and also the activity (activity is something like: "Left Warehouse")
Should this is updated manully by the vendor in the dashboard, or do i need like an API to implement this feature