less_secure_your_backend_email : https://myaccount.google.com/lesssecu...
dj-rest-auth : installation link : https://dj-rest-auth.readthedocs.io/e...
dj-rest-auth : endpoints link : https://dj-rest-auth.readthedocs.io/e...
django rest framework : linstallation : https://www.django-rest-framework.org...
allauth : https://django-allauth.readthedocs.io...
python decouple secure your email and password and secrets credentials
00:00 start
00:27 pip install djangorestframework markdown django-filter
01:12 pip install 'dj-rest-auth[with_social]'
02:21 INSTALLEDAPPS
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
#new
'django.contrib.sites',
#3rd party app
'rest_framework',
'rest_framework.authtoken',
'dj_rest_auth',
#allauth
'allauth',
'allauth.account',
'allauth.socialaccount',
'dj_rest_auth.registration',
#local
'core',
'accounts'
]
04:16 settings.urls
urlpatterns = [
path('admin/', admin.site.urls),
path('core/',include('core.urls',)),
path('accounts/', include('accounts.urls')),
path('registration/', include('dj_rest_auth.registration.urls')),
path('account/',include('allauth.urls')),
]
04:45 python manage.py migrate
06:54 For Backend Email
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = "EMAIL_HOST_USER" # sender email
EMAIL_HOST_PASSWORD = "EMAIL_HOST_PASSWORD" #password
08:40 less secure your email
link: https://myaccount.google.com/lesssecu...
09:05 pip install python-decouple
10:47 settings.py
from decouple import config
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = config("EMAIL_HOST_USER") # sender email
EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD") #password