Commit 30799eb0 authored by Bruno Martin's avatar Bruno Martin
Browse files

code cleanup

parent 3af44cc1
......@@ -5,17 +5,11 @@ from .models import Video
class VideoSerializer(serializers.ModelSerializer):
file = serializers.FileField(read_only=True)
class Meta:
model = Video
fields = ('id', 'name', 'youtube_id', 'file',)
read_only_fields = ('file',)
#def get_file(self, obj):
# with fallbacks(False):
# files = VideoFileSerializer(required=False, allow_null=True, read_only=True, **{'context': self.context}).data
# files = [f for f in files if f['file'] != None]
# return files
class VideoFileSerializer(serializers.ModelSerializer):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment