Exemple #1
0
 def verify(self, request):
     """ Account verification """
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     serializer.save()
     data = {"message": "Congratulations, now go share some rides"}
     return Response(data, status=status.HTTP_200_OK)
Exemple #2
0
 def verify(self, request):
     ''' Account verification. '''
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     serializer.save()
     data = {'message': 'Congratulation, now go share some rides!'}
     return Response(data, status=status.HTTP_200_OK)
Exemple #3
0
 def post(self, request, *args, **kwargs):
     """ Handle HTTP Post request """
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     serializer.save()
     data = {"Message": "Congratulations, now go share some rides"}
     return Response(data, status=status.HTTP_200_OK)
Exemple #4
0
    def verify(self, request):
        """ Account Verification API view. """

        serializer = AccountVerificationSerializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        serializer.save()
        data = {'message': 'Congratulations, now go comparte some rides!'}

        return Response(data, status=status.HTTP_200_OK)
Exemple #5
0
 def verify(self, request):
     """Account verification"""
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     serializer.save()
     data = {
         'message':
         'Congratulations... Now you can use your Comparte Ride account'
     }
     return Response(data, status=status.HTTP_200_OK)
Exemple #6
0
 def verify(
     self, request
 ):  # El nombre es cualquiera, es importante que el nombre del metodo que tenemos aqui  que sea el que queremos en la url. Algo asi users/signup
     """Verificacion de cuenta."""
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     #Solo devolvemos el user por que primero el usuario tiene que verificar su email.
     serializer.save()
     data = {
         'message': '¡Felicidades, ahora ve a compartir algunos paseos!'
     }
     return Response(data, status=status.HTTP_200_OK)
Exemple #7
0
 def verify(self, request):
     serializer = AccountVerificationSerializer(data=request.data)
     serializer.is_valid(raise_exception=True)
     serializer.save()
     data = {'message': 'Congratulations all is well.'}
     return Response(data, status=status.HTTP_200_OK)