Advertisement
Mushfiqul_Islam

Views

Aug 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def edit(request, List_id ):
  2. item = get_object_or_404(List, pk=List_id)
  3. if reques.method == 'POST':
  4. form = ListForm(request.POST, instance=item)
  5. form.save()
  6. return redirect('home')
  7.  
  8. else:
  9. form =ListForm(instance=item)
  10. return render(request, 'edit.html', {'form':form})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement