added vendor files
This commit is contained in:
parent
e348d39de5
commit
2b4d8bb4f3
|
@ -26,7 +26,7 @@ SECRET_KEY = 'django-insecure-z#_ppfgs06)e4v18t!970-&-&jkxht!tw&ms#u5n_m-fbxulwa
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['10.0.70.5']
|
ALLOWED_HOSTS = ['10.0.70.5', '127.0.0.1']
|
||||||
|
|
||||||
# User substitution
|
# User substitution
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#auth-custom-user
|
# https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#auth-custom-user
|
||||||
|
@ -43,6 +43,13 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django_bcrypt',
|
'django_bcrypt',
|
||||||
|
'django_otp',
|
||||||
|
'django_otp.plugins.otp_static',
|
||||||
|
'django_otp.plugins.otp_totp',
|
||||||
|
'django_otp.plugins.otp_email', # <- if you want email capability.
|
||||||
|
'two_factor',
|
||||||
|
'two_factor.plugins.phonenumber', # <- if you want phone number capability.
|
||||||
|
'two_factor.plugins.email', # <- if you want email capability.
|
||||||
#
|
#
|
||||||
'base.apps.BaseConfig',
|
'base.apps.BaseConfig',
|
||||||
'users.apps.UsersConfig',
|
'users.apps.UsersConfig',
|
||||||
|
@ -54,6 +61,7 @@ MIDDLEWARE = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django_otp.middleware.OTPMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
@ -143,23 +151,44 @@ STATICFILES_DIRS = [
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'handlers': {
|
||||||
|
'console': {
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'class': 'logging.StreamHandler',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'two_factor': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': 'INFO',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Messages customize
|
# Messages customize
|
||||||
|
|
||||||
MESSAGE_TAGS = {
|
MESSAGE_TAGS = {
|
||||||
messages.DEBUG: "alert-info",
|
messages.DEBUG: "text-info",
|
||||||
messages.INFO: "alert-info",
|
messages.INFO: "text-info",
|
||||||
messages.SUCCESS: "alert-success",
|
messages.SUCCESS: "text-success",
|
||||||
messages.WARNING: "alert-warning",
|
messages.WARNING: "text-warning",
|
||||||
messages.ERROR: "alert-danger",
|
messages.ERROR: "text-danger",
|
||||||
}
|
}
|
||||||
|
|
||||||
BCRYPT_ROUNDS = 11
|
BCRYPT_ROUNDS = 11
|
||||||
|
|
||||||
PASSWORD_RESET_TIMEOUT = 3600 #
|
PASSWORD_RESET_TIMEOUT = 3600 #
|
||||||
|
#LOGIN_URL = 'two_factor:login'
|
||||||
|
#OTP_LOGIN_URL = 'account:login'
|
||||||
|
|
||||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
||||||
SESSION_COOKIE_SECURE = False #to be switched to true when in prod
|
SESSION_COOKIE_SECURE = False #to be switched to true when in prod
|
||||||
CSRF_COOKIE_SECURE = False #to be switched to true when in prod
|
CSRF_COOKIE_SECURE = False #to be switched to true when in prod
|
||||||
SECURE_SSL_REDIRECT = False #to be switched to true when in prod
|
SECURE_SSL_REDIRECT = False #to be switched to true when in prod
|
||||||
SESSION_COOKIE_AGE = 3600
|
SESSION_COOKIE_AGE = 3600
|
||||||
|
TWO_FACTOR_REMEMBER_COOKIE_AGE = 3600
|
||||||
SERVER_EMAIL = 'info@litepay.ch'
|
SERVER_EMAIL = 'info@litepay.ch'
|
||||||
|
DEFAULT_FROM_EMAIL = 'info@litepay.ch'
|
|
@ -16,9 +16,15 @@ Including another URLconf
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from two_factor.urls import urlpatterns as tf_urls
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
#path('', include(tf_urls)),
|
||||||
path('', include('base.urls'))
|
path('', include('base.urls'))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
'''
|
||||||
|
urlpatterns = [
|
||||||
|
path('admin/', admin.site.urls),
|
||||||
|
|
||||||
|
]
|
||||||
|
'''
|
Loading…
Reference in New Issue