diff --git a/cinema/serializers.py b/cinema/serializers.py index 070971ea5..912ea0a4f 100644 --- a/cinema/serializers.py +++ b/cinema/serializers.py @@ -12,21 +12,25 @@ class MovieSerializer(serializers.ModelSerializer): class Meta: model = Movie fields = ("id", "title", "description", "duration") + read_only_fields = ("id",) class GenreSerializer(serializers.ModelSerializer): class Meta: model = Genre fields = ("id", "name") + read_only_fields = ("id",) class CinemaHallSerializer(serializers.ModelSerializer): class Meta: model = CinemaHall fields = ("id", "name", "rows", "seats_in_row") + read_only_fields = ("id",) class ActorSerializer(serializers.ModelSerializer): class Meta: model = Actor fields = ("id", "first_name", "last_name") + read_only_fields = ("id",)