-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #397
base: master
Are you sure you want to change the base?
Develop #397
Conversation
@@ -1,24 +1,104 @@ | |||
from rest_framework import serializers | |||
|
|||
from cinema.models import Movie | |||
from cinema.models import Movie, Actor, CinemaHall, Genre | |||
|
|||
|
|||
class MovieSerializer(serializers.Serializer): | |||
id = serializers.IntegerField(read_only=True) | |||
title = serializers.CharField(max_length=255) | |||
description = serializers.CharField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mb its better to use TextField if u dont specify max_length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cinema/views.py
Outdated
from rest_framework.request import Request | ||
from rest_framework.response import Response | ||
from rest_framework import status | ||
from rest_framework import status, mixins, generics, viewsets | ||
|
||
from django.shortcuts import get_object_or_404 | ||
from rest_framework.views import APIView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to follow the sequence of imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done ❄
No description provided.