serializers.py 216 B

12345678
  1. from rest_framework import serializers
  2. from .models import User, LoginToken
  3. class UserSerializer(serializers.ModelSerializer):
  4. class Meta:
  5. model = User
  6. fields = ('username', 'password', 'email')