mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
upload
This commit is contained in:
parent
e4de8a39a4
commit
03927a2394
4 changed files with 104 additions and 7 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue