Skip to content

Commit

Permalink
Add school verbose name
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed May 19, 2024
1 parent 6bbf15f commit 112527b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion personal/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ class Meta:

@ts_interface(context='personal')
class SchoolSerializer(serializers.ModelSerializer):
verbose_name = serializers.SerializerMethodField('get_verbose_name')

class Meta:
model = School
fields = '__all__'
fields = ['code', 'name', 'abbreviation', 'street',
'city', 'zip_code', 'email', 'district', 'verbose_name']

def get_verbose_name(self, obj):
return str(obj)


@ts_interface(context='personal')
Expand Down

0 comments on commit 112527b

Please sign in to comment.