personinfo.py 328 B

123456789101112
  1. from rest_framework import serializers
  2. from SharixAdmin.models import SharixUser
  3. class PersonInfoSerializer(serializers.ModelSerializer):
  4. full_name = serializers.ReadOnlyField()
  5. class Meta:
  6. model = SharixUser
  7. fields = ['full_name']
  8. def validate(self, attrs):
  9. return super().validate(attrs)