Updating a value in serializer after accessing .data in Django Rest Framework
The serializer's save()
method return corresponding instance. So, you can use that to get the url
post = PostCreateSerializer(data=request.data, context={'request': request})
post.is_valid(raise_excpetions=True)
post_instance = post.save()
media_url = post_instance.media.url
link = find_link_value()
post_instance.link = link
post_instance.save()