password recovery integrated
This commit is contained in:
parent
a1904d0b41
commit
08b476851e
@ -1,18 +1,49 @@
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Configuration of your django application
|
# Configuration of your django application
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#
|
|
||||||
# Users library
|
|
||||||
#
|
|
||||||
# This enables or disables the self registration
|
|
||||||
USERS_SELF_REGISTRATION = False
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Themes library
|
# Themes library
|
||||||
#
|
#
|
||||||
# This defines the default theme, if no theme is set in the django parameters
|
# This defines the default theme, if no theme is set in the django parameters
|
||||||
DEFAULT_THEME = 'clear-green'
|
DEFAULT_THEME = 'clear-green'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Users library
|
||||||
|
#
|
||||||
|
# This enables or disables the self registration
|
||||||
|
# If you enable self registration it is recommended to configure "Django mail / smtp settings"
|
||||||
|
USERS_SELF_REGISTRATION = False
|
||||||
|
# This enables or disables the mail validation after self registration
|
||||||
|
USERS_MAIL_VALIDATION = True
|
||||||
|
# This enables or disables the account activation by an admin after self registration
|
||||||
|
USERS_ADMIN_ACTIVATION = True
|
||||||
|
# The timeout for password recovery and mail validation tokens send via email
|
||||||
|
PASSWORD_RESET_TIMEOUT = 60 * 60 * 3 # 3 hours
|
||||||
|
|
||||||
|
#
|
||||||
|
# Django mail / smtp settings
|
||||||
|
#
|
||||||
|
# The hostname of the smtp server
|
||||||
|
# EMAIL_HOST = "<smtp_host>"
|
||||||
|
# The port used for the smtp connection
|
||||||
|
# EMAIL_PORT = <port_number>
|
||||||
|
# The username for smtp authentication
|
||||||
|
# EMAIL_HOST_USER = "<smtp_user>"
|
||||||
|
# The password for smtp authentication
|
||||||
|
# EMAIL_HOST_PASSWORD = "<smtp_password>"
|
||||||
|
# The sender of piki emails
|
||||||
|
# EMAIL_FROM = "piki@<host>"
|
||||||
|
# Set to True, if TLS shall be used
|
||||||
|
# EMAIL_USE_TLS = False
|
||||||
|
# Set to True, if SSL shall be used
|
||||||
|
# EMAIL_USE_SSL = True
|
||||||
|
# The smtp timeout
|
||||||
|
# EMAIL_TIMEOUT =
|
||||||
|
# Define a ssl keyfile
|
||||||
|
# EMAIL_SSL_KEYFILE =
|
||||||
|
# Define an ssl certificate
|
||||||
|
# EMAIL_SSL_CERTFILE =
|
||||||
|
|
||||||
#
|
#
|
||||||
# Django
|
# Django
|
||||||
#
|
#
|
||||||
@ -24,6 +55,10 @@ DEBUG = False
|
|||||||
# SECURITY WARNING: don't run with a dummy secret in production! And don't let others read this key!
|
# SECURITY WARNING: don't run with a dummy secret in production! And don't let others read this key!
|
||||||
SECRET_KEY = None
|
SECRET_KEY = None
|
||||||
|
|
||||||
|
# Define the administrators (for mail delivery)
|
||||||
|
ADMINS = [("PaTT", EMAIL_FROM), ]
|
||||||
|
|
||||||
|
|
||||||
# This defines the listener hostnames for your django server
|
# This defines the listener hostnames for your django server
|
||||||
# SECURITY WARNING: don't run with '0.0.0.0' in in production, unless you know what you are doing!
|
# SECURITY WARNING: don't run with '0.0.0.0' in in production, unless you know what you are doing!
|
||||||
# ALLOWED_HOSTS = ['<YOUR_SERVER_HOSTNAME>', ]
|
# ALLOWED_HOSTS = ['<YOUR_SERVER_HOSTNAME>', ]
|
||||||
|
@ -7,7 +7,7 @@ For more information on this file, see
|
|||||||
https://docs.djangoproject.com/en/5.1/topics/settings/
|
https://docs.djangoproject.com/en/5.1/topics/settings/
|
||||||
|
|
||||||
For the full list of settings and their values, see
|
For the full list of settings and their values, see
|
||||||
https://docs.djangoproject.com/en/3.0/ref/settings/
|
https://docs.djangoproject.com/en/5.1/ref/settings/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -24,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
@ -41,6 +41,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
#
|
||||||
'simple_history',
|
'simple_history',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -180,6 +181,20 @@ USER_CONFIG_DEFAULTS = {
|
|||||||
'DEFAULT_THEME': 'clear-green',
|
'DEFAULT_THEME': 'clear-green',
|
||||||
'ALLOWED_HOSTS': ['127.0.0.1', 'localhost', ],
|
'ALLOWED_HOSTS': ['127.0.0.1', 'localhost', ],
|
||||||
'CSRF_TRUSTED_ORIGINS': [],
|
'CSRF_TRUSTED_ORIGINS': [],
|
||||||
|
'ADMINS': [],
|
||||||
|
'PASSWORD_RESET_TIMEOUT': 60*60*3,
|
||||||
|
#
|
||||||
|
'EMAIL_HOST': None,
|
||||||
|
'EMAIL_PORT': None,
|
||||||
|
'EMAIL_HOST_USER': None,
|
||||||
|
'EMAIL_FROM': "piki",
|
||||||
|
'EMAIL_HOST_PASSWORD': None,
|
||||||
|
'EMAIL_USE_TLS': None,
|
||||||
|
'EMAIL_USE_SSL': None,
|
||||||
|
'EMAIL_TIMEOUT': None,
|
||||||
|
'EMAIL_SSL_KEYFILE': None,
|
||||||
|
'EMAIL_SSL_CERTFILE': None,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set configuration parameters
|
# Set configuration parameters
|
||||||
@ -188,9 +203,12 @@ thismodule = sys.modules[__name__]
|
|||||||
for property_name in USER_CONFIG_DEFAULTS:
|
for property_name in USER_CONFIG_DEFAULTS:
|
||||||
try:
|
try:
|
||||||
value = getattr(config, property_name)
|
value = getattr(config, property_name)
|
||||||
|
setattr(thismodule, property_name, value)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
value = USER_CONFIG_DEFAULTS[property_name]
|
if not property_name.startswith('EMAIL_') or property_name == 'EMAIL_FROM':
|
||||||
setattr(thismodule, property_name, value)
|
value = USER_CONFIG_DEFAULTS[property_name]
|
||||||
|
setattr(thismodule, property_name, value)
|
||||||
|
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
#
|
#
|
||||||
|
2
themes
2
themes
@ -1 +1 @@
|
|||||||
Subproject commit 47e9f3104c5016ef9405c90ee5dfca6e638e7d82
|
Subproject commit b7673fa82763830009c7dc95ecf93d7e96f692f9
|
2
users
2
users
@ -1 +1 @@
|
|||||||
Subproject commit 3a24ee2459d25b71cbd6cf79e486ccbf3567b928
|
Subproject commit 12526f44d736b360a2c92a46eabed1c455e1b4fa
|
Loading…
x
Reference in New Issue
Block a user