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:
parent
3b002c0c50
commit
304097fb9d
2 changed files with 9 additions and 7 deletions
|
@ -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']
|
Loading…
Add table
Add a link
Reference in a new issue