Skip to content

Commit

Permalink
Patch for item deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeinzimer committed Oct 27, 2018
1 parent 15facf1 commit ff65f91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sporkify/frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,15 @@ def delete_inventory(request):
item_id = request.POST.get('product_code')
item = Inventory.objects.get(product_code=item_id)
item.delete()
return render(request, 'inventory.html', {
})
return render(request, 'inventory.html', {
"items": Inventory.objects.all(),
"vendors": Vendor.objects.all(),
"channels": Sale_Site.objects.all(),
"employee": Employee.objects.all(),
"shift": Shift.objects.all(),
"product_types": Product_Type.objects.all(),
"conditions": Condition.objects.all()
})


@login_required
Expand Down

0 comments on commit ff65f91

Please sign in to comment.