config.cfg.template 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # This file has been automatically generated on {{ timestamp }}.
  2. # Feel free to adjust it as needed.
  3. import os
  4. import datetime
  5. from flaskbb.configs.default import DefaultConfig
  6. # Flask Settings
  7. # ------------------------------
  8. # There is a whole bunch of more settings available here:
  9. # http://flask.pocoo.org/docs/0.11/config/#builtin-configuration-values
  10. DEBUG = {{ is_debug }}
  11. TESTING = False
  12. # Server Name - REQUIRED for Celery/Mailing
  13. # The name and port number of the server.
  14. # Required for subdomain support (e.g.: 'myapp.dev:5000') and
  15. # URL generation without a request context but with an application context
  16. # which we need in order to generate URLs (with the celery application)
  17. # Note that localhost does not support subdomains so setting this to
  18. # “localhost” does not help.
  19. # Example for the FlaskBB forums: SERVER_NAME = "forums.flaskbb.org"
  20. SERVER_NAME = "{{ server_name }}"
  21. # Prefer HTTPS over HTTP
  22. PREFERRED_URL_SCHEME = "{{ url_scheme }}"
  23. # Database
  24. # ------------------------------
  25. # For PostgresSQL:
  26. #SQLALCHEMY_DATABASE_URI = "postgresql://flaskbb@localhost:5432/flaskbb"
  27. # For SQLite:
  28. SQLALCHEMY_DATABASE_URI = "{{ database_uri }}"
  29. # This option will be removed as soon as Flask-SQLAlchemy removes it.
  30. # At the moment it is just used to suppress the super annoying warning
  31. SQLALCHEMY_TRACK_MODIFICATIONS = False
  32. # This will print all SQL statements
  33. SQLALCHEMY_ECHO = False
  34. # Security - IMPORTANT
  35. # ------------------------------
  36. # This is the secret key that is used for session signing.
  37. # You can generate a secure key with os.urandom(24)
  38. SECRET_KEY = "{{ secret_key }}"
  39. # You can generate the WTF_CSRF_SECRET_KEY the same way as you have
  40. # generated the SECRET_KEY. If no WTF_CSRF_SECRET_KEY is provided, it will
  41. # use the SECRET_KEY.
  42. WTF_CSRF_ENABLED = True
  43. WTF_CSRF_SECRET_KEY = "{{ csrf_secret_key }}"
  44. # Auth
  45. # ------------------------------
  46. LOGIN_VIEW = "auth.login"
  47. REAUTH_VIEW = "auth.reauth"
  48. LOGIN_MESSAGE_CATEGORY = "info"
  49. REFRESH_MESSAGE_CATEGORY = "info"
  50. # The name of the cookie to store the “remember me” information in.
  51. REMEMBER_COOKIE_NAME = "remember_token"
  52. # The amount of time before the cookie expires, as a datetime.timedelta object.
  53. # Default: 365 days (1 non-leap Gregorian year)
  54. REMEMBER_COOKIE_DURATION = datetime.timedelta(days=365)
  55. # If the “Remember Me” cookie should cross domains,
  56. # set the domain value here (i.e. .example.com would allow the cookie
  57. # to be used on all subdomains of example.com).
  58. REMEMBER_COOKIE_DOMAIN = None
  59. # Limits the “Remember Me” cookie to a certain path.
  60. REMEMBER_COOKIE_PATH = "/"
  61. # Restricts the “Remember Me” cookie’s scope to secure channels (typically HTTPS).
  62. REMEMBER_COOKIE_SECURE = None
  63. # Prevents the “Remember Me” cookie from being accessed by client-side scripts.
  64. REMEMBER_COOKIE_HTTPONLY = False
  65. # Full-Text-Search
  66. # ------------------------------
  67. # This will use the "whoosh_index" directory to store the search indexes
  68. WHOOSHEE_DIR = os.path.join(DefaultConfig.basedir, "whoosh_index", DefaultConfig.py_version)
  69. # How long should whooshee try to acquire write lock? (defaults to 2)
  70. WHOOSHEE_WRITER_TIMEOUT = 2
  71. # Minimum number of characters for the search (defaults to 3)
  72. WHOOSHEE_MIN_STRING_LEN = 3
  73. # Redis
  74. # ------------------------------
  75. # If redis is enabled, it can be used for:
  76. # - Sending non blocking emails via Celery (Task Queue)
  77. # - Caching
  78. # - Rate Limiting
  79. REDIS_ENABLED = {{ redis_enabled }}
  80. REDIS_URL = "{{ redis_uri }}"
  81. REDIS_DATABASE = 0
  82. # Celery
  83. # ------------------------------
  84. CELERY_BROKER_URL = "{{ redis_uri }}"
  85. CELERY_RESULT_BACKEND = "{{ redis_uri }}"
  86. # Rate Limiting
  87. # -------------------------------
  88. # A full list with configuration values is available at the flask-limiter
  89. # docs, but you actually just need those settings below.
  90. # You can disabled the Rate Limiter here as well - it will overwrite
  91. # the setting from the admin panel!
  92. # RATELIMIT_ENABLED = True
  93. # You can choose from:
  94. # memory:// (default)
  95. # redis://host:port
  96. # memcached://host:port
  97. # Using the redis storage requires the installation of the redis package,
  98. # which will be installed if you enable REDIS_ENABLE while memcached
  99. # relies on the pymemcache package.
  100. RATELIMIT_STORAGE_URL = "{% if redis_enabled %}{{ redis_uri }}{% else %}memory://{% endif %}"
  101. # Caching
  102. # ------------------------------
  103. # For all available caching types, have a look at the Flask-Cache docs
  104. # https://pythonhosted.org/Flask-Caching/#configuring-flask-caching
  105. CACHE_TYPE = "{% if redis_enabled %}redis{% else %}simple{% endif %}"
  106. CACHE_DEFAULT_TIMEOUT = 60
  107. # Mail
  108. # ------------------------------
  109. # Google Mail Example
  110. # https://support.google.com/mail/answer/7126229?hl=en
  111. #MAIL_SERVER = "smtp.gmail.com"
  112. #MAIL_PORT = 587
  113. #MAIL_USE_TLS = True
  114. #MAIL_USE_SSL = True
  115. #MAIL_USERNAME = "your_username@gmail.com"
  116. #MAIL_PASSWORD = "your_password"
  117. #MAIL_DEFAULT_SENDER = ("Your Name", "your_username@gmail.com")
  118. # Local SMTP Server
  119. MAIL_SERVER = "{{ mail_server }}"
  120. MAIL_PORT = {{ mail_port }}
  121. MAIL_USE_SSL = {{ mail_use_ssl }}
  122. MAIL_USE_TLS = {{ mail_use_tls }}
  123. MAIL_USERNAME = "{{ mail_username }}"
  124. MAIL_PASSWORD = "{{ mail_password }}"
  125. MAIL_DEFAULT_SENDER = ("{{ mail_sender_name }}", "{{ mail_sender_address }}")
  126. # Where to logger should send the emails to
  127. ADMINS = ["{{ mail_admin_address }}"]
  128. # If SEND_LOGS is set to True, the admins (see the mail configuration) will
  129. # recieve the error logs per email.
  130. SEND_LOGS = False
  131. # FlaskBB Settings
  132. # ------------------------------ #
  133. # URL Prefixes
  134. FORUM_URL_PREFIX = ""
  135. USER_URL_PREFIX = "/user"
  136. MESSAGE_URL_PREFIX = "/message"
  137. AUTH_URL_PREFIX = "/auth"
  138. ADMIN_URL_PREFIX = "/admin"