Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save EleaFederio/35ea7cc44bc56d0e0731948a4855c4d4 to your computer and use it in GitHub Desktop.
Save EleaFederio/35ea7cc44bc56d0e0731948a4855c4d4 to your computer and use it in GitHub Desktop.
$('#quantity').val(data.product.quantity);
$('#details').val(data.product.details);
$('#price').val(data.product.price);
$('#category').val(data.product.category);
$('#status').val(data.product.status);
$('#due_date').val(data.product.due_date);
var preview_image_url = data.product.picture == null ? 'image_not_available.png' : data.product.picture;
$('#productPic2').attr('src', 'http://127.0.0.1:8000/images/'+preview_image_url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment