示例#1
0
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('/')
示例#2
0
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')
示例#3
0
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('/')
示例#4
0
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')