1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-02 19:55:18 +02:00

Mobile optimization from #170

This commit is contained in:
Sean Morley 2024-08-06 12:11:50 -04:00
parent 3b002c0c50
commit 304097fb9d
2 changed files with 9 additions and 7 deletions

View file

@ -16,17 +16,16 @@ class CountrySerializer(serializers.ModelSerializer):
class Meta:
model = Country
fields = '__all__' # Serialize all fields of the Adventure model
read_only_fields = '__all__'
read_only_fields = ['id', 'name', 'country_code', 'continent', 'flag_url']
class RegionSerializer(serializers.ModelSerializer):
flag_url = ''
class Meta:
model = Region
fields = '__all__' # Serialize all fields of the Adventure model
read_only_fields = '__all__'
read_only_fields = ['id', 'name', 'country']
class VisitedRegionSerializer(serializers.ModelSerializer):
class Meta:
model = VisitedRegion
fields = '__all__' # Serialize all fields of the Adventure model
read_only_fields = ['user_id']
read_only_fields = ['user_id', 'id']