1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-01-09 16:22:21 +00:00
plateforme-corres2math/apps/api/serializers.py
2020-12-26 21:26:26 +01:00

20 lines
437 B
Python

# Copyright (C) 2020 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
from django.contrib.auth.models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""
Serialize a User object into JSON.
"""
class Meta:
model = User
exclude = (
'username',
'password',
'groups',
'user_permissions',
)