Example #1
0
 def post(self, request):
     resource_id = request.GET.get('id')
     resource = get_object_or_404(Resource, pk=resource_id)
     form = ResourceForm(request.POST,request.FILES,instance=resource)
     if form.is_valid():
         form.save()
         return HttpResponseRedirect(reverse("szuspeech:manage_list"))
     return render(request,'szuspeech/manage-form.html',{'form':form})
Example #2
0
 def post(self, request):
     resource_id = request.GET.get('id')
     resource = get_object_or_404(Resource, pk=resource_id)
     form = ResourceForm(request.POST, request.FILES, instance=resource)
     if form.is_valid():
         form.save()
         return HttpResponseRedirect(reverse("szuspeech:manage_list"))
     return render(request, 'szuspeech/manage-form.html', {'form': form})
Example #3
0
 def post(self, request):
     form = ResourceForm(request.POST, request.FILES)
     if form.is_valid():
         form.save()
         return HttpResponseRedirect(reverse("szuspeech:manage_list"))
     return render(request, 'szuspeech/manage-form.html', {'form':form})
Example #4
0
 def post(self, request):
     form = ResourceForm(request.POST, request.FILES)
     if form.is_valid():
         form.save()
         return HttpResponseRedirect(reverse("szuspeech:manage_list"))
     return render(request, 'szuspeech/manage-form.html', {'form': form})