📜  DateTimeField 更改格式 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:10.006000             🧑  作者: Mango

代码示例1
class UserSerializer(serializers.ModelSerializer):
   date_joined = serializers.DateTimeField(format="")

class Meta:
    model = User
    fields = ('username', 'email', 'first_name', 'last_name', 'is_superuser', 'is_staff', 'is_active','get_absolute_url')