I have this Model
class inventory_transaction(models.Model):
stockin = models.DecimalField(blank=True, null=True,max_digits=8, decimal_places=2)
stockout = models.DecimalField(blank=True,null=True,max_digits=8, decimal_places=2)
from_container = models.ForeignKey(container_identity)
staffs = models.ForeignKey(staff_name)
goods_details = models.ForeignKey(departments)
balance = models.DecimalField(max_digits=8, decimal_places=2)
date = models.DateTimeField(auto_now=True)
class meta:
ordering = ["date"]
get_latest_by = "date"
My Question is
- How do i save do i save data into it with its multiple foreign keys fields taken care of
Thanks