Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
aminatadjer committed Jul 4, 2020
2 parents 4cdcd27 + 3c8272a commit d614579
Show file tree
Hide file tree
Showing 83 changed files with 17 additions and 1 deletion.
Binary file modified API/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified API/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file modified API/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified API/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
Binary file modified __pycache__/config.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified article/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified article/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file modified article/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file modified commentaire/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified coronawatch/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file modified coronawatch/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file modified customauth/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions customauth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class Meta:
model = User
fields = '__all__'

class EmailSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['email']

class UserPasswordSerializer(serializers.ModelSerializer):
password = serializers.CharField(
Expand Down
14 changes: 13 additions & 1 deletion customauth/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.shortcuts import render
from rest_framework.decorators import action

from .serializers import MyTokenObtainPairSerializer, UserCreateSerializer, UserSerializer, UserPasswordSerializer
from .serializers import MyTokenObtainPairSerializer, UserCreateSerializer, UserSerializer, UserPasswordSerializer, EmailSerializer
from rest_framework.views import APIView
from rest_framework import status, permissions, viewsets
from rest_framework.response import Response
Expand Down Expand Up @@ -45,3 +45,15 @@ def resetPassword(self, request, pk=None):
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

@action(methods=['put'], detail=True)
def resetEmail(self, request, pk=None):
try:
user = User.objects.get(pk=pk)
except User.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)
serializer = EmailSerializer(user, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Binary file modified map/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified map/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified map/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified map/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified map/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified map/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified map/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file modified map/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified report/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified report/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file modified report/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/apps.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified robot/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified robot/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file modified robot/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified scraper/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified scraper/__pycache__/googleSearchScrapping.cpython-38.pyc
Binary file not shown.
Binary file modified scraper/__pycache__/twitterScrapping.cpython-38.pyc
Binary file not shown.
Binary file modified scraper/__pycache__/updater.cpython-38.pyc
Binary file not shown.
Binary file modified scraper/__pycache__/youtubeScraper.cpython-38.pyc
Binary file not shown.
Binary file modified sendMail/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified sendMail/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified sendMail/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified sendMail/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed videos/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified videos/migrations/__pycache__/0001_initial.cpython-38.pyc
Binary file not shown.
Binary file modified videos/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.

0 comments on commit d614579

Please sign in to comment.