a guest Feb 28th, 2020 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def trans(request, design_id):
  2.     helper = CostFormSetHelper()
  3.     if request.method == 'POST':
  4.         formset = CostFormSet(request.POST)
  5.         if formset.is_valid:
  6.             pass
  7.     if request.method == 'GET':
  8.         design_material = Material.objects.filter(design__pk=design_id)
  9.         formset = CostFormSet(queryset=design_material)
  10.     return render(request, "designs/trans.html", {'formset': formset, 'helper': helper, 'design_id': design_id})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand