Open OisinWrites opened 1 year ago
Task 1: Install Django Allauth
pip install django-allauth
Task 2: Configure Django Allauth in Settings
'allauth'
'allauth.account'
INSTALLED_APPS
INSTALLED_APPS = [ ... 'allauth', 'allauth.account', ... ]
AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', ]
This ensures that Allauth is used for authentication.
Task 3: URL Configuration
from django.urls import include
urlpatterns
urlpatterns = [ ... path('accounts/', include('allauth.urls')), ... ]
This sets up the URL patterns for Allauth's views.
Task 4: Database Migration
python manage.py makemigrations
python manage.py migrate
This will create the required database tables for Allauth.
Task 5: Static Files Configuration
STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static')
python manage.py collectstatic
Task 1: Install Django Allauth
Task 2: Configure Django Allauth in Settings
'allauth'
and'allauth.account'
to theINSTALLED_APPS
list:This ensures that Allauth is used for authentication.
Task 3: URL Configuration
urlpatterns
list:This sets up the URL patterns for Allauth's views.
Task 4: Database Migration
This will create the required database tables for Allauth.
Task 5: Static Files Configuration