1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-26 23:27:08 +00:00
plateforme-tfjm2/apps/api/serializers.py

20 lines
437 B
Python
Raw Normal View History

2020-12-27 10:49:54 +00:00
# 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',
)