VRE Backend API and Scheduler
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.
 
 
 
 
 

13 lines
483 B

from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from .models import Token
class TokenSerializer(serializers.ModelSerializer):
class Meta:
model = Token
fields = ['key','secret']
class TokenLoginSerializer(serializers.Serializer):
username = serializers.CharField(max_length=200, help_text=_('Your username to login'))
password = serializers.CharField(max_length=200, help_text=_('Your password to login'))