2015-06-29 04:43:17 +00:00
|
|
|
# coding=utf-8
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
|
|
|
|
class UserLoginSerializer(serializers.Serializer):
|
|
|
|
username = serializers.CharField(max_length=30)
|
|
|
|
password = serializers.CharField(max_length=30)
|
2015-08-03 08:52:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class UsernameCheckSerializer(serializers.Serializer):
|
|
|
|
username = serializers.CharField(max_length=30)
|
|
|
|
|
2015-08-03 10:45:26 +00:00
|
|
|
|
|
|
|
class UserRegisterSerializer(serializers.Serializer):
|
|
|
|
username = serializers.CharField(max_length=30)
|
|
|
|
real_name = serializers.CharField(max_length=30)
|
|
|
|
password = serializers.CharField(max_length=30, min_length=6)
|
|
|
|
|
2015-08-03 11:54:55 +00:00
|
|
|
|
|
|
|
class UserChangePasswordSerializer(serializers.Serializer):
|
|
|
|
username = serializers.CharField(max_length=30)
|
|
|
|
old_password = serializers.CharField(max_length=30, min_length=6)
|
|
|
|
new_password = serializers.CharField(max_length=30, min_length=6)
|
|
|
|
|