[Fixed]-Issue's saving multiple records with ajax in django

1👍

✅

change the change dim.save() to Dimension.objects.create()

https://stackoverflow.com/a/23926742/475565

you also should change id’s to classes

$('.dim_form').on('submit', function(){
  var data = $(this).serialize();

  // send the ajax call here. $(this) is the form instance
  var description = $(this).find('input[name=description]').val();
  ...
});

Leave a comment