def edit_image(request, image_id):
image = get_object_or_404(Addimage, id=image_id)
form = ImageSizeForm(
request.POST or None,
files=request.FILES or None
)
if form.is_valid():
height = form.cleaned_data['height']
width = form.cleaned_data['width']
#??????????????
image.save()
return render(request, 'single_image.html',
{'item': image, 'form': form})
return render(request, 'single_image.html',
{'item': image, 'form': form})