def handle_upload(request): new_img = SharedImage() new_img.image = request.FILES['file'] new_img.title = request.POST['title'] new_img.description = request.POST['description'] new_img.save() return HttpResponseRedirect('/')
def handle_upload(request): new_shrdimg = SharedImage() new_shrdimg.image = request.FILES['file'] new_shrdimg.title = request.POST['title'] new_shrdimg.description = request.POST['description'] new_shrdimg.save() return redirect('main')
def hnd_load(request): shr = SharedImage() shr.image = request.FILES['file'] shr.title = request.POST['title'] shr.description = request.POST['description'] shr.save() return redirect('main')