Firstly hope this is the correct Subchannel (this is view related). I’ll try to explain my issue and cut to the chase with the code, although I may need to expand my code submission to explain in better detail.
I’m working on an image object in a view, editing some metadata within it, then saving it. I am then accessing the image again with via it’s pk
and assigning it to a new variable which is passed via context to the template. The image is displayed but instead of it being the ‘new image’ with changed metadata when i right-click save-as, it’s the ‘original’. But, when I open the ‘new image’ in a new window and save-as the data has changed.
So, saving image then accessing it again. All pretty straightforward. But the new_image isnt updating it’s changes in metadata until I open it in a new window…
image.save()
new_image = Uploaded_Image.objects.get(pk=image.pk)
return render(request, "partials/test.html", {'image':image, 'new_image': new_image}
Then template
<img src="{{ new_image.image.url }}" >