Skip to content

Commit

Permalink
Merge pull request #55 from acremonezi/52-2005869-settings-review-all…
Browse files Browse the repository at this point in the history
…-settings

Closes #52, fixed bug with django_allauth and review all settings
  • Loading branch information
2005869 committed Jun 19, 2022
2 parents 416235d + ee96350 commit ecda107
Showing 1 changed file with 10 additions and 38 deletions.
48 changes: 10 additions & 38 deletions django_project/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
https://docs.djangoproject.com/en/4.0/ref/settings/
"""

from pathlib import Path
# from pathlib import Path
import os
import environ

Expand All @@ -37,6 +37,7 @@
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/


# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = env('SECRET_KEY')

Expand Down Expand Up @@ -65,11 +66,11 @@
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',

]
# Application definition


# Application definition

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Expand Down Expand Up @@ -100,17 +101,6 @@

WSGI_APPLICATION = 'config.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
# }

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
Expand Down Expand Up @@ -197,46 +187,27 @@
}
'''

ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS =True

# django_allauth configuration
ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = True
LOGIN_REDIRECT_URL = 'project_index'

ACCOUNT_LOGOUT_REDIRECT_URL = 'project_index'

ACCOUNT_SIGNUP_REDIRECT_URL = 'project_index'

ACCOUNT_SIGNUP_REDIRECT_URL = 'account_login'
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = 'project_index'

ACCOUNT_AUTHENTICATION_METHOD = 'email'

ACCOUNT_EMAIL_REQUIRED = True

ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = None

ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3



CCOUNT_EMAIL_VERIFICATION = 'mandatory'

ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 5

ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300

ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = False

ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE = True

ACCOUNT_LOGIN_ON_PASSWORD_RESET = False

ACCOUNT_SESSION_REMEMBER = None

ACCOUNT_SIGNUP_EMAIL_ENTER_TWICE = True

ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True

ACCOUNT_UNIQUE_EMAIL = True

# end allauth config


Expand All @@ -247,4 +218,5 @@
# DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL')
DEFAULT_FROM_EMAIL='Bee <noreply@bee.espertamente.com.br>'
DEFAULT_FROM_NAME = 'Bee'
SENDGRID_ECHO_TO_STDOUT = True
SENDGRID_ECHO_TO_STDOUT = True
# end sendgrid configuration

0 comments on commit ecda107

Please sign in to comment.