# -*- coding: utf-8 -*- """ flaskbb.configs.base ~~~~~~~~~~~~~~~~~~~~ This is the base configuration for FlaskBB that every site should have. You can override these configuration variables in another class. :copyright: (c) 2013 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import os class DefaultConfig(object): # Get the app root path # <_basedir> # ../../ --> flaskbb/flaskbb/configs/base.py _basedir = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) PROJECT = "flaskbb" DEBUG = False TESTING = False # Logs # If SEND_LOGS is set to True, the admins (see the mail configuration) will # recieve the error logs per email. SEND_LOGS = False # The filename for the info and error logs. The logfiles are stored at # flaskbb/logs INFO_LOG = "info.log" ERROR_LOG = "error.log" # Default Database SQLALCHEMY_DATABASE_URI = 'sqlite:///' + _basedir + '/' + \ PROJECT + ".sqlite" # sqlite for testing/debug. SQLALCHEMY_ECHO = False # Security # This is the secret key that is used for session signing. # You can generate a secure key with os.urandom(24) SECRET_KEY = 'secret key' # Protection against form post fraud WTF_CSRF_ENABLED = True WTF_CSRF_SECRET_KEY = "reallyhardtoguess" # Auth LOGIN_VIEW = "auth.login" REAUTH_VIEW = "auth.reauth" LOGIN_MESSAGE_CATEGORY = "error" # Caching CACHE_TYPE = "simple" CACHE_DEFAULT_TIMEOUT = 60 ## Captcha RECAPTCHA_ENABLE = False RECAPTCHA_USE_SSL = False RECAPTCHA_PUBLIC_KEY = "your_public_recaptcha_key" RECAPTCHA_PRIVATE_KEY = "your_private_recaptcha_key" RECAPTCHA_OPTIONS = {"theme": "white"} ## Mail MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USE_SSL = False MAIL_USE_TLS = False MAIL_USERNAME = "noreply@example.org" MAIL_PASSWORD = "" MAIL_DEFAULT_SENDER = ("Default Sender", "noreply@example.org") ADMINS = ["admin@example.org"] ## App specific configs # Pagination # How many posts per page are displayed POSTS_PER_PAGE = 10 # How many topics per page are displayed TOPICS_PER_PAGE = 10 # How many users per page are displayed. # This affects mainly the memberlist USERS_PER_PAGE = 10 # How long the use can be inactive before he is marked as offline ONLINE_LAST_MINUTES = 15 # The length of the topic title in characters on the index TITLE_LENGTH = 15