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.
12 lines
373 B
12 lines
373 B
6 months ago
|
from rest_framework import serializers
|
||
|
from .models import ExampleModel
|
||
|
from django.contrib.auth.models import User
|
||
|
|
||
|
class LoginSerializer(serializers.Serializer):
|
||
|
username = serializers.CharField()
|
||
|
password = serializers.CharField()
|
||
|
|
||
|
class ExampleModelSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = ExampleModel
|
||
|
fields = '__all__'
|