Re: new record is created while updating

2022-06-24 Thread Ayush Bajpai
raise self.model.DoesNotExist( apps.courseApp.models.Batch.DoesNotExist: Batch matching query does not exist. actually this is the error it is giving but i do have a batch_id.., when i prefill the data of particular batch_id in edit form it gets displayed corretly there. but here it gives t

new record is created while updating

2022-06-23 Thread Ayush Bajpai
model: class Batch(models.Model): batch_id = models.AutoField(primary_key=True, default=None) batch_name = models.CharField(max_length=256, default=None, null=True) ... some more fields views: def organisationEditBatch(request, batch_id): batch = Batch.objects.get(batch_id=batch_id