Added django allauth registration model#147
Conversation
| from django.http import HttpResponse | ||
|
|
||
| def profile(request): | ||
| return render(request, "profile.html") No newline at end of file |
| from django.shortcuts import render | ||
| from django.http import HttpResponse | ||
|
|
||
| def profile(request): |
| @@ -0,0 +1,5 @@ | |||
| from django.shortcuts import render | |||
| from django.http import HttpResponse | |||
There was a problem hiding this comment.
'django.http.HttpResponse' imported but unused
| EMAIL_HOST_PASSWORD='Gorakhpur#1997' | ||
| EMAIL_PORT=587 | ||
| EMAIL_USE_TLS=True | ||
| LOGIN_REDIRECT_URL = "profile/" No newline at end of file |
| 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.
missing whitespace around operator
| os.path.join(BASE_DIR, 'main/'), | ||
| ) | ||
|
|
||
| EMAIL_HOST='smtp.gmail.com' |
There was a problem hiding this comment.
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.
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.
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.
line too long (81 > 79 characters)
|
|
||
| AUTH_PASSWORD_VALIDATORS = [ | ||
| { | ||
| 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', |
There was a problem hiding this comment.
line too long (91 > 79 characters)
| except user_cls.DoesNotExist: | ||
| return None | ||
| return None | ||
|
|
|
|
||
| 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.
line too long (132 > 79 characters)
|
|
||
| try { | ||
| if (!jQuery && module && module.exports) { | ||
| var jQuery = require("jquery"), |
afd5db3 to
8914a0a
Compare
| data = { | ||
| 'is_present': User.objects.filter(username__iexact=username).exists() | ||
| } | ||
| return JsonResponse(data) 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.
line too long (89 > 79 characters)
bf4d12e to
32d8782
Compare
8e16ed2 to
0614159
Compare
There was a problem hiding this comment.
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! 🚀 ❤️
tapaswenipathak
left a comment
There was a problem hiding this comment.
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
developbranch.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: