Skip to content

Commit f213da9

Browse files
committed
Added a few comments. Removed unecessary lines
1 parent bfec8ad commit f213da9

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

my_project/settings.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,8 @@
139139

140140
# Rest framework permissions
141141
REST_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

registration/static/home.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

registration/views.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
from django.contrib.auth.models import User
33
from django.db import IntegrityError
44
from django.http import JsonResponse
5-
from django.shortcuts import render
6-
7-
# Create your views here.
85
from rest_framework import status
96
from rest_framework.decorators import api_view, permission_classes
107
from rest_framework.exceptions import APIException
11-
from rest_framework.parsers import JSONParser
128
from rest_framework.permissions import IsAuthenticated
139
from rest_framework_jwt.settings import api_settings
1410

0 commit comments

Comments
 (0)