# django-allauth-theme
An awesome and responsive django-allauth theme based on tailwind.
## Install
```bash
pip install django-allauth-theme
```
### Configuring the settings file
First of all, add `allauth_theme` and `crispy_forms` to `INSTALLED_APPS`.
```python
INSTALLED_APPS = (
...
'crispy_forms',
'allauth_theme',
...
)
```
Add following context processors to the list:
```python
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
'allauth_theme.context_processors.welcome_text'
],
}
}
]
```
Now include the urls in your urls.py
```python
urlpatterns = [
...
path('', include('allauth_theme.urls')),
...
]
```
Configuration for settings:
```python
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
```
### Google One Tap Login
If you want to use the google one tap you must you must include following changes to your settings for developement environment:
#### Some notices for the developing environment
```python
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.
Raw data
{
"_id": null,
"home_page": "http://pypi.python.org/pypi/django-allauth-theme/",
"name": "django-allauth-theme",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "django auth account social openid twitter facebook oauth registration theme tailwindcss",
"author": "Leonardo Di Lella",
"author_email": "leonardo.dilella@mobileapart.com",
"download_url": "https://files.pythonhosted.org/packages/01/d0/8e46581a8bab45659bfee62faf4f2b1f1545735dbd7b6cf9304db8ac59e2/django_allauth_theme-0.7.3.tar.gz",
"platform": null,
"description": "# django-allauth-theme\n\nAn awesome and responsive django-allauth theme based on tailwind.\n\n## Install\n\n```bash\npip install django-allauth-theme\n```\n\n### Configuring the settings file\n\nFirst of all, add `allauth_theme` and `crispy_forms` to `INSTALLED_APPS`.\n\n```python\nINSTALLED_APPS = (\n ...\n 'crispy_forms',\n 'allauth_theme',\n ...\n)\n```\n\nAdd following context processors to the list:\n\n```python\nTEMPLATES = [\n {\n ...\n 'OPTIONS': {\n 'context_processors': [\n ...\n 'allauth_theme.context_processors.welcome_text'\n ],\n }\n }\n]\n```\n\nNow include the urls in your urls.py\n\n```python\nurlpatterns = [\n ...\n path('', include('allauth_theme.urls')),\n ...\n]\n```\n\nConfiguration for settings:\n\n```python\nDAT_WELCOME_TITLE = 'Welcome Title' # title\nDAT_WELCOME_TITLE_MOBILE = 'Welcome mobile' # mobile title\nDAT_WELCOME_TEXT = 'Description of your project' # text for your project\nDAT_GOOGLE_ENABLE_ONETAP_LOGIN = True # decide if you want to show the google one tap login\nDAT_GOOGLE_CLIENT_ID = '' # google client id , e.g. XXXXXXXXXX39-62ckbbeXXXXXXXXXXXXXXXXXXXXXm1.apps.googleusercontent.com\nDAT_BASE_URL = '' # e.g. http://localhost:8000\nDAT_TOS_MESSAGE = 'By registering, you agree to our <a href=\"\">Terms of Service</a> and <a href=\"\">Privacy Policy.</a>' # optional\n```\n\n### Google One Tap Login\n\nIf you want to use the google one tap you must you must include following changes to your settings for developement environment:\n\n#### Some notices for the developing environment\n\n```python\nSECURE_REFERRER_POLICY = 'no-referrer-when-downgrade'\n```\n\nAdd 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:\n\n```http://localhost:8000/accounts/google/login/callback/```\n\nYou can add also use 127.0.0.1 as URI if you don't want to use Google One Tap functionally while developing.\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "An awesome and responsive django-allauth theme based on tailwind",
"version": "0.7.3",
"project_urls": {
"Homepage": "http://pypi.python.org/pypi/django-allauth-theme/"
},
"split_keywords": [
"django",
"auth",
"account",
"social",
"openid",
"twitter",
"facebook",
"oauth",
"registration",
"theme",
"tailwindcss"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01d08e46581a8bab45659bfee62faf4f2b1f1545735dbd7b6cf9304db8ac59e2",
"md5": "1b9d61150b402ebc7cfb061a113e4464",
"sha256": "ff775225a5842854ff409802299b1f3b4f99a795927c9d0f9d61e7024c6630e5"
},
"downloads": -1,
"filename": "django_allauth_theme-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "1b9d61150b402ebc7cfb061a113e4464",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 25387,
"upload_time": "2024-05-24T17:31:11",
"upload_time_iso_8601": "2024-05-24T17:31:11.696479Z",
"url": "https://files.pythonhosted.org/packages/01/d0/8e46581a8bab45659bfee62faf4f2b1f1545735dbd7b6cf9304db8ac59e2/django_allauth_theme-0.7.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-24 17:31:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-allauth-theme"
}