-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added django allauth registration model #147
Added django allauth registration model #147
Conversation
oshc/authentication/views.py
Outdated
from django.http import HttpResponse | ||
|
||
def profile(request): | ||
return render(request, "profile.html") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no newline at end of file
oshc/authentication/views.py
Outdated
from django.shortcuts import render | ||
from django.http import HttpResponse | ||
|
||
def profile(request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines, found 1
oshc/authentication/views.py
Outdated
@@ -0,0 +1,5 @@ | |||
from django.shortcuts import render | |||
from django.http import HttpResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'django.http.HttpResponse' imported but unused
oshc/oshc/settings.py
Outdated
EMAIL_HOST_PASSWORD='Gorakhpur#1997' | ||
EMAIL_PORT=587 | ||
EMAIL_USE_TLS=True | ||
LOGIN_REDIRECT_URL = "profile/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no newline at end of file
oshc/oshc/settings.py
Outdated
EMAIL_HOST_USER='vaibhav.singh.14cse@bml.edu.in' | ||
EMAIL_HOST_PASSWORD='Gorakhpur#1997' | ||
EMAIL_PORT=587 | ||
EMAIL_USE_TLS=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace around operator
oshc/oshc/settings.py
Outdated
@@ -118,3 +151,10 @@ | |||
STATICFILES_DIRS = ( | |||
os.path.join(BASE_DIR, 'main/'), | |||
) | |||
|
|||
EMAIL_HOST='smtp.gmail.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace around operator
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', | ||
}, | ||
{ | ||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', | ||
}, | ||
{ | ||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', | ||
}, | ||
{ | ||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
|
||
AUTH_PASSWORD_VALIDATORS = [ | ||
{ | ||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (91 > 79 characters)
except user_cls.DoesNotExist: | ||
return None | ||
return None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
|
||
class EmailLoginBackend(object): | ||
''' | ||
This class checks that the user can be authenticated via our backend and if it fails than normal authentication backend is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (132 > 79 characters)
|
||
try { | ||
if (!jQuery && module && module.exports) { | ||
var jQuery = require("jquery"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'jQuery' is already defined.
afd5db3
to
8914a0a
Compare
data = { | ||
'is_present': User.objects.filter(username__iexact=username).exists() | ||
} | ||
return JsonResponse(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no newline at end of file
urlpatterns = [ | ||
url(r'^accounts/', include('allauth.urls')), | ||
url(r'^accounts/login/profile/', views.profile, name="profile"), | ||
url(r'^ajax/validate_username/$', views.validate_username, name='validate_username'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (89 > 79 characters)
bf4d12e
to
32d8782
Compare
8e16ed2
to
0614159
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make it live on another Heroku app first before we merge this to predev
. This is on me.
First we all test this there and then come to code review or how we can make it better, if we can.
This is big to review and enables more than one feature in a single pull request, but all up for this, for obvious reasons! 🚀 ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't making any previous features down, tested with separate Heroku deployment. We can test on predev itself and enhance things(if needed) and then merge to dev would be cleaner and all up. Merged. 🙌
Checklist
develop
branch.Which issue does this PR fix?: fixes #95
Testing link: https://sheltered-depths-79669.herokuapp.com/
Todo:
Screenshots:
Login Form:
Signup Form:
Email Verification
Password Reset:
Change Password:
Features of Password Strength: