1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00

Add support for end date to adventure

This commit is contained in:
Sean Morley 2024-08-18 12:30:12 -04:00
parent 276ea42138
commit 03e0530e90
9 changed files with 66 additions and 5 deletions

View file

@ -37,7 +37,7 @@ class AdventureSerializer(serializers.ModelSerializer):
images = AdventureImageSerializer(many=True, read_only=True)
class Meta:
model = Adventure
fields = ['id', 'user_id', 'name', 'description', 'rating', 'activity_types', 'location', 'date', 'is_public', 'collection', 'created_at', 'updated_at', 'images', 'link', 'type', 'longitude', 'latitude']
fields = ['id', 'user_id', 'name', 'description', 'rating', 'activity_types', 'location', 'date', 'is_public', 'collection', 'created_at', 'updated_at', 'images', 'link', 'type', 'longitude', 'latitude', 'end_date']
read_only_fields = ['id', 'created_at', 'updated_at', 'user_id']
def to_representation(self, instance):