Don't use serializers.CharField
while adding an image.
Good example:
movie_image = serializers.ImageField(...)
Bad example:
movie_image = serializers.CharField(...)
-
Make sure you've added a blank line at the end to all your files.
-
Group imports using
()
if needed.
Good example:
from django.contrib.auth.mixins import (
LoginRequiredMixin,
UserPassesTestMixin,
PermissionRequiredMixin,
)
Bad example:
from django.contrib.auth.mixins import LoginRequiredMixin, \
UserPassesTestMixin, PermissionRequiredMixin
Another bad example:
from django.contrib.auth.mixins import (
LoginRequiredMixin,
UserPassesTestMixin, PermissionRequiredMixin,
)
Add comments, prints, and functions to check your solution when you write your code. Don't forget to delete them when you are ready to commit and push your code.