# coding=utf-8

from rest_framework import serializers
from django.conf import settings
from .models import Upload


class UploadSerializer(serializers.ModelSerializer):
    # picture = serializers.SerializerMethodField()

    # def get_picture(self, obj):
        # print(5555555,obj.id)
        # return '%s%s' % (settings.MEDIA_URL, obj.picture)

    class Meta:
        model = Upload
        fields = ('picture', 'width', 'height')
