from rest_framework import serializers from photo_log.models import PhotoGroup, Photo, PhotoLog class PhotoGroupSerializer(serializers.ModelSerializer): class Meta: model = PhotoGroup fields = ('id', 'name', 'date') class PhotosSerializer(serializers.ModelSerializer): class Meta: model = Photo fields = ('id', 'legacy_id', 'group') class PhotoSerializer(serializers.ModelSerializer): class Meta: model = Photo fields = ('id', 'legacy_id', 'group', 'bbox_coords', 'rotate', 'intersections', 'original_image', 'cropped_image', 'ocr_text') class PhotoUpdateSerializer(serializers.ModelSerializer): class Meta: model = Photo fields = ('id', 'legacy_id', 'group', 'bbox_coords', 'rotate', 'ocr_text') class PhotoLogSerializer(serializers.ModelSerializer): class Meta: model = PhotoLog fields = ('id', 'title', 'date', 'render_date', 'start_slide_image', 'slides', 'pdf') class PhotoLogsSerializer(serializers.ModelSerializer): class Meta: model = PhotoLog fields = ('id', 'title', 'date', 'pdf')