1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 15:29:36 +02:00
AdventureLog/backend/server/worldtravel/serializers.py
2024-07-08 11:44:39 -04:00

18 lines
No EOL
607 B
Python

from .models import Country, Region, VisitedRegion
from rest_framework import serializers
class CountrySerializer(serializers.ModelSerializer):
class Meta:
model = Country
fields = '__all__' # Serialize all fields of the Adventure model
class RegionSerializer(serializers.ModelSerializer):
class Meta:
model = Region
fields = '__all__' # Serialize all fields of the Adventure model
class VisitedRegionSerializer(serializers.ModelSerializer):
class Meta:
model = VisitedRegion
fields = '__all__' # Serialize all fields of the Adventure model