Skip to content

Commit

Permalink
Merge pull request #4 from schryer/master
Browse files Browse the repository at this point in the history
🐛 request.DATA ==> request.data
  • Loading branch information
schryer authored Sep 1, 2016
2 parents b2eb2bf + 2d834e9 commit f2f8f2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tg_react/api/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def enforce_csrf(self, request):
serializer_class = AuthenticationSerializer

def post(self, request):
serializer = self.serializer_class(data=request.DATA)
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
do_login(request, serializer.user)

Expand All @@ -115,7 +115,7 @@ def get_object(self):
return {'language_code': getattr(self.raw_request, '_lang', get_language_from_request(self.raw_request))}

def update(self, request, *args, **kwargs):
serializer = self.serializer_class(data=request.DATA)
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
setattr(self.raw_request, 'update_language_cookie', serializer.validated_data['language_code'])
setattr(self.raw_request, '_lang', serializer.validated_data['language_code'])
Expand All @@ -142,7 +142,7 @@ class SignUpView(APIView):
authentication_classes = (UnsafeSessionAuthentication, )

def post(self, request):
serializer = self.serializer_class(data=request.DATA, context={'request': request})
serializer = self.serializer_class(data=request.data, context={'request': request})
if serializer.is_valid():
data = serializer.validated_data.copy()
password = data.pop('password', None)
Expand Down Expand Up @@ -192,7 +192,7 @@ def send_email_notification(self, user, uid_and_token_b64):
msg.send()

def post(self, request):
serializer = self.serializer_class(data=request.DATA)
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
self.send_email_notification(serializer.user, serializer.validated_data['uid_and_token_b64'])
return Response({'success': True})
Expand All @@ -217,7 +217,7 @@ class RestorePassword(APIView):
permission_classes = (AllowAny, )

def post(self, request):
serializer = self.serializer_class(data=request.DATA)
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
user = serializer.user
user.set_password(serializer.validated_data['password'])
Expand Down

0 comments on commit f2f8f2c

Please sign in to comment.