An awesome and responsive django-allauth theme based on tailwind.
![screenshot_login](https://private-user-images.githubusercontent.com/64521/336120032-9b9ff7e4-514c-4484-b2c3-d4a611e95503.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNTMyOTYsIm5iZiI6MTcyMjE1Mjk5NiwicGF0aCI6Ii82NDUyMS8zMzYxMjAwMzItOWI5ZmY3ZTQtNTE0Yy00NDg0LWIyYzMtZDRhNjExZTk1NTAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDA3NDk1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYwYzZhZjczM2Y4MTM3MzU4MmI1NDlhZDgwNjY1MjNlYjg4OWU1NjQ1Y2E3M2FlOWExNmQ3MmRiYzVhMWUxNTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4ZZn88cZ1tD1g9IngxixPHiqsqKm8xmhp3xbrbd1Gcg)
pip install django-allauth-theme
First of all, add allauth_theme
and crispy_forms
to INSTALLED_APPS
.
INSTALLED_APPS = (
...
'crispy_forms',
'allauth_theme',
...
)
Add following context processors to the list:
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
'allauth_theme.context_processors.welcome_text'
],
}
}
]
Now include the urls in your urls.py
urlpatterns = [
...
path('', include('allauth_theme.urls')),
...
]
Configuration for settings:
DAT_WELCOME_TITLE = 'Welcome Title' # title
DAT_WELCOME_TITLE_MOBILE = 'Welcome mobile' # mobile title
DAT_WELCOME_TEXT = 'Description of your project' # text for your project
DAT_GOOGLE_ENABLE_ONETAP_LOGIN = True # decide if you want to show the google one tap login
DAT_GOOGLE_CLIENT_ID = '' # google client id , e.g. XXXXXXXXXX39-62ckbbeXXXXXXXXXXXXXXXXXXXXXm1.apps.googleusercontent.com
DAT_BASE_URL = '' # e.g. http://localhost:8000
DAT_TOS_MESSAGE = 'By registering, you agree to our <a href="">Terms of Service</a> and <a href="">Privacy Policy.</a>' # optional
If you want to use the google one tap you must you must include following changes to your settings for developement environment:
SECURE_REFERRER_POLICY = 'no-referrer-when-downgrade'
Add http://localhost, http://localhost:8000, http://127.0.0.1 and http://127.0.0.1:8000 to your "Authorized JavaScript origins" in your google developer console. While you are working in the development environment you must use "localhost" instead of "127.0.0.1". As "Authorized redirect URIs" just use following URIs if you are working in the development environment:
http://localhost:8000/accounts/google/login/callback/
You can add also use 127.0.0.1 as URI if you don't want to use Google One Tap functionally while developing.