Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirDolhyi committed Dec 4, 2024
1 parent 5be6bbd commit 6f33f21
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions cinema/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,22 @@ class Meta:

class MovieSessionListSerializer(serializers.ModelSerializer):
movie_title = serializers.CharField(source="movie.title", read_only=True)
cinema_hall_name = serializers.CharField(source="cinema_hall.name", read_only=True)
cinema_hall_capacity = serializers.IntegerField(source="cinema_hall.capacity", read_only=True)
cinema_hall_name = serializers.CharField(
source="cinema_hall.name", read_only=True
)
cinema_hall_capacity = serializers.IntegerField(
source="cinema_hall.capacity", read_only=True
)

class Meta:
model = MovieSession
fields = ["id", "show_time", "movie_title", "cinema_hall_name", "cinema_hall_capacity"]
fields = [
"id",
"show_time",
"movie_title",
"cinema_hall_name",
"cinema_hall_capacity"
]


class MovieSessionRetrieveSerializer(MovieSessionSerializer):
Expand Down

0 comments on commit 6f33f21

Please sign in to comment.