How to save one field value from a model to another field of a linked model.

2016-08-16 Thread Md. Ohiduzzaman
I have designed a linked model named Shiftdate as: class Shiftdate(models.Model): shift_date = models.DateField(blank=False,unique=True) sit_date = models.ForeignKey(Sitting, on_delete=models.CASCADE) Using this model I changed sit_date to shift_date which

How to save one field value from a model to another model field

2016-08-16 Thread Md. Ohiduzzaman
down votefavorite I designed two models: one model for storing Sitting date and another mode for storing Shifting date. Two model are linked by foreign key. Here is my two models: class Sitting(models.Model):