Remove redundant required=True from serializer fields

This commit is contained in:
Maxim Kukhtenkov 2016-12-21 13:47:24 -08:00
parent 9df9608631
commit 5bcf31f545
2 changed files with 4 additions and 4 deletions

View File

@ -123,8 +123,8 @@ class RegisterSerializer(serializers.Serializer):
required=allauth_settings.USERNAME_REQUIRED
)
email = serializers.EmailField(required=allauth_settings.EMAIL_REQUIRED)
password1 = serializers.CharField(required=True, write_only=True)
password2 = serializers.CharField(required=True, write_only=True)
password1 = serializers.CharField(write_only=True)
password2 = serializers.CharField(write_only=True)
def validate_username(self, username):
username = get_adapter().clean_username(username)

View File

@ -10,8 +10,8 @@ if 'allauth.socialaccount' in settings.INSTALLED_APPS:
class TwitterLoginSerializer(serializers.Serializer):
access_token = serializers.CharField(required=True)
token_secret = serializers.CharField(required=True)
access_token = serializers.CharField()
token_secret = serializers.CharField()
def _get_request(self):
request = self.context.get('request')