NexusDash-izebra/app/settings_example.py

60 lines
1.8 KiB
Python
Raw Normal View History

2022-01-16 18:22:00 +00:00
# Settings common to all environments (development|staging|production)
# Application settings
APP_NAME = "Nexus Dashboard"
APP_SYSTEM_ERROR_SUBJECT_LINE = APP_NAME + " system error"
APP_SECRET_KEY = ""
APP_DATABASE_URI = "mysql+pymysql://<username>:<password>@<host>:<port>/<database>"
2022-07-03 13:17:38 +00:00
CONFIG_LINK = False
CONFIG_LINK_TITLE = ""
CONFIG_LINK_HREF = ""
CONFIG_LINK_TEXT = ""
2022-01-18 03:55:48 +00:00
# Send Analytics for Developers to better fix issues
ALLOW_ANALYTICS = False
2022-01-16 18:22:00 +00:00
# Flask settings
CSRF_ENABLED = True
# Flask-SQLAlchemy settings
SQLALCHEMY_TRACK_MODIFICATIONS = False
WTF_CSRF_TIME_LIMIT = 86400
# Flask-User settings
USER_APP_NAME = APP_NAME
USER_ENABLE_CHANGE_PASSWORD = True # Allow users to change their password
USER_ENABLE_CHANGE_USERNAME = False # Allow users to change their username
2022-01-16 18:22:00 +00:00
USER_ENABLE_REGISTER = False # Allow new users to register
# Should alwyas be set to true
USER_REQUIRE_RETYPE_PASSWORD = True # Prompt for `retype password`
USER_ENABLE_USERNAME = True # Register and Login with username
# Email Related Settings
USER_ENABLE_EMAIL = False # Register with Email WILL - DISABLE OTHER THINGS TOO
2022-01-16 18:22:00 +00:00
USER_ENABLE_CONFIRM_EMAIL = True # Force users to confirm their email
USER_ENABLE_INVITE_USER = False # Allow users to be invited
USER_REQUIRE_INVITATION = False # Only invited users may - WILL DISABLE REGISTRATION
USER_ENABLE_FORGOT_PASSWORD = True # Allow users to reset their passwords
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 587
MAIL_USE_SSL = False
MAIL_USE_TLS = True
MAIL_USERNAME = None
MAIL_PASSWORD = None
USER_EMAIL_SENDER_NAME = None
USER_EMAIL_SENDER_EMAIL = None
2022-01-16 18:22:00 +00:00
# Require Play Key
REQUIRE_PLAY_KEY = True
2022-03-13 02:34:04 +00:00
# Password hashing settings DO NOT CHANGE
2022-01-16 18:22:00 +00:00
USER_PASSLIB_CRYPTCONTEXT_SCHEMES = ['bcrypt'] # bcrypt for password hashing
# Flask-User routing settings
USER_AFTER_LOGIN_ENDPOINT = "main.index"
USER_AFTER_LOGOUT_ENDPOINT = "main.index"