You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
358 B

from django.contrib.auth.models import User
from rest_framework import serializers
class UserDescSerializer(serializers.ModelSerializer):
"""文章列表中引用的嵌套序列化器"""
class Meta:
model = User
fields = [
'id',
'username',
# 'last_login',
# 'date_joined'
]