I'm using Django rest framework APIView method to retrieve image field (Image saved in local and name saved in DB). Is there any way to append Host, Port and media Folder automatically. Now i'm appending manually. But if i'm using Viewset it appended automatically. Both method i'm using for different scenario. Can anyone suggest some way to solve the issues.
for val in ModuleList.objects.filter(user_type_id=user_type):
os.path.join(settings.MEDIA_URL, str(val.module_img))
This is how i'm appending url manually