File tree Expand file tree Collapse file tree 3 files changed +2
-11
lines changed Expand file tree Collapse file tree 3 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 139139
140140# Rest framework permissions
141141REST_FRAMEWORK = {
142- # Use Django's standard `django.contrib.auth` permissions,
143- # or allow read-only access for unauthenticated users.
144- # 'DEFAULT_PERMISSION_CLASSES': [
145- # 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
146- # ],
147142 'DEFAULT_AUTHENTICATION_CLASSES' : (
148143 'rest_framework_jwt.authentication.JSONWebTokenAuthentication' ,
149- 'rest_framework.authentication.SessionAuthentication' ,
150- 'rest_framework.authentication.BasicAuthentication' ,
151144 ),
152145}
153146
Original file line number Diff line number Diff line change @@ -64,10 +64,12 @@ function loginFacebook() {
6464
6565
6666 jqxhr . done ( function ( data , textStatus , jqXHR ) {
67+ //user registration successfull. Do something.
6768 toastr . success ( 'Logged In successfully!' , 'Success' )
6869 } ) ;
6970
7071 jqxhr . fail ( function ( jqXHR , textStatus , errorThrown ) {
72+ //user registration failed. Do something.
7173 toastr . error ( 'Please try again' , 'Login Failed!' )
7274 } ) ;
7375
Original file line number Diff line number Diff line change 22from django .contrib .auth .models import User
33from django .db import IntegrityError
44from django .http import JsonResponse
5- from django .shortcuts import render
6-
7- # Create your views here.
85from rest_framework import status
96from rest_framework .decorators import api_view , permission_classes
107from rest_framework .exceptions import APIException
11- from rest_framework .parsers import JSONParser
128from rest_framework .permissions import IsAuthenticated
139from rest_framework_jwt .settings import api_settings
1410
You can’t perform that action at this time.
0 commit comments