Я хочу выбрать запись с условием tow, появляется сообщение "'Albums' object has no attribute 'get'", как это решить?
Я пытаюсь выбрать запись с условием tow, появляется сообщение "'Albums' object has no атрибут 'get'", как это решить? def upload(request,id): prod = uploadf(request.POST or None, request.FILES or None)
if request.method == 'GET':
context = {
'form': prod,
}
return render(request, 'upload.html', context)
else:
user=request.user
s = user.id
All = get_object_or_404(models.Albums, user_id=s, id=id)
return All
form=uploadf(instance=All)
context={'form':'form'}
return render(request, 'All_Albums.html', context)