1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00
This commit is contained in:
Sean Morley 2024-08-16 20:31:39 -04:00
parent e4de8a39a4
commit 03927a2394
4 changed files with 104 additions and 7 deletions

View file

@ -1,11 +1,11 @@
import os
from .models import Adventure, ChecklistItem, Collection, Note, Transportation, Checklist
from .models import Adventure, AdventureImage, ChecklistItem, Collection, Note, Transportation, Checklist
from rest_framework import serializers
class AdventureImageSerializer(serializers.ModelSerializer):
class Meta:
model = Adventure
fields = ['id', 'image']
model = AdventureImage
fields = ['id', 'image', 'adventure']
read_only_fields = ['id']
def to_representation(self, instance):