Postgresql – How to check if the email/username already exists in the db in django?
How to check if the email_id/ username already exists in the database in django? I want to check the existence of the email/username in the views rather than in serializer. Following is the code: @api_view(['POST']) def registerUser(request): f_name = request.data.get('f_name')…