<gh_stars>0
from rest_framework import serializers
from .models import MovieData

class MovieSerializer(serializers.ModelSerializer):
    image = serializers.ImageField(max_length=None, use_url=True)
    class Meta:
        model = MovieData
        fields = ['id', 'name', 'duration', 'rating', 'category', 'image']
from rest_framework import serializers
from .models import MovieData

class MovieSerializer(serializers.ModelSerializer):
    image = serializers.ImageField(max_length=None, use_url=True)
    class Meta:
        model = MovieData
        fields = ['id', 'name', 'duration', 'rating', 'category', 'image']