I'm currently making a loop that duplicates X times a post.
The problem here is in the ImageField, all is working but the image path that is going to be set in the new duplicate post, has the same path. So if you delete the original post, the duplicates will lose their image too...
this is the code that duplicates de post:
while counter < recurrence_posting:
event_loop = Post.objects.create(title=form.instance.title, thumb=form.instance.thumb)
counter += 1
day_counter += 1
get_spot = get_object_or_404(Spot, id=event_loop.id)
get_spot.save()
How to avoid this?