Giter Club home page Giter Club logo

django-allauth-theme's Introduction

django-allauth-theme

An awesome and responsive django-allauth theme based on tailwind.

screenshot_login

Install

pip install django-allauth-theme

Configuring the settings file

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

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

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.

django-allauth-theme's People

Contributors

ledil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

django-allauth-theme's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.