1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-27 09:02:21 +00:00
plateforme-corres2math/apps/api/serializers.py

17 lines
360 B
Python
Raw Normal View History

2020-09-20 20:31:37 +00:00
from django.contrib.auth.models import User
from rest_framework import serializers
2020-09-24 09:44:43 +00:00
2020-09-20 20:31:37 +00:00
class UserSerializer(serializers.ModelSerializer):
"""
Serialize a User object into JSON.
"""
class Meta:
model = User
exclude = (
'username',
'password',
'groups',
'user_permissions',
)