mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-04 12:45:17 +02:00
migration to new backend
This commit is contained in:
parent
28a5d423c2
commit
9abe9fb315
309 changed files with 21476 additions and 24132 deletions
18
backend/server/worldtravel/serializers.py
Normal file
18
backend/server/worldtravel/serializers.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue