production.py.example 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. """
  2. flaskbb.configs.example
  3. ~~~~~~~~~~~~~~~~~~~~
  4. This is how a production configuration can look like.
  5. :copyright: (c) 2014 by the FlaskBB Team.
  6. :license: BSD, see LICENSE for more details.
  7. """
  8. from flaskbb.configs.default import DefaultConfig
  9. class ProductionConfig(DefaultConfig):
  10. ## Database
  11. # If no SQL service is choosen, it will fallback to sqlite
  12. # For PostgresSQL:
  13. #SQLALCHEMY_DATABASE_URI = "postgresql://localhost/example"
  14. # For SQLite:
  15. #SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DefaultConfig._basedir + '/' + \
  16. # 'flaskbb.sqlite'
  17. ## Security
  18. # This is the secret key that is used for session signing.
  19. # You can generate a secure key with os.urandom(24)
  20. SECRET_KEY = 'secret key'
  21. # You can generate the WTF_CSRF_SECRET_KEY the same way as you have
  22. # generated the SECRET_KEY. If no WTF_CSRF_SECRET_KEY is provided, it will
  23. # use the SECRET_KEY.
  24. WTF_CSRF_ENABLED = True
  25. WTF_CSRF_SECRET_KEY = "reallyhardtoguess"
  26. ## Caching
  27. # For all available caching types, take a look at the Flask-Cache docs
  28. # https://pythonhosted.org/Flask-Cache/#configuring-flask-cache
  29. CACHE_TYPE = "simple"
  30. CACHE_DEFAULT_TIMEOUT = 60
  31. ## Captcha
  32. # To get recaptcha, visit the link below:
  33. # https://www.google.com/recaptcha/admin/create
  34. RECAPTCHA_ENABLED = False
  35. RECAPTCHA_USE_SSL = False
  36. RECAPTCHA_PUBLIC_KEY = "your_public_recaptcha_key"
  37. RECAPTCHA_PRIVATE_KEY = "your_private_recaptcha_key"
  38. RECAPTCHA_OPTIONS = {"theme": "white"}
  39. ## Mail
  40. # Local SMTP Server
  41. MAIL_SERVER = "localhost"
  42. MAIL_PORT = 25
  43. MAIL_USE_SSL = False
  44. MAIL_USERNAME = ""
  45. MAIL_PASSWORD = ""
  46. MAIL_DEFAULT_SENDER = ("FlaskBB Mailer", "noreply@example.org")
  47. # Google Mail Example
  48. #MAIL_SERVER = "smtp.gmail.com"
  49. #MAIL_PORT = 465
  50. #MAIL_USE_SSL = True
  51. #MAIL_USERNAME = "your_username@gmail.com"
  52. #MAIL_PASSWORD = "your_password"
  53. #MAIL_DEFAULT_SENDER = ("Your Name", "your_username@gmail.com")
  54. # The user who should recieve the error logs
  55. #ADMINS = ["your_admin_user@gmail.com"]
  56. ## Error/Info Logging
  57. # If SEND_LOGS is set to True, the admins (see the mail configuration) will
  58. # recieve the error logs per email.
  59. SEND_LOGS = False
  60. # The filename for the info and error logs. The logfiles are stored at
  61. # flaskbb/logs
  62. INFO_LOG = "info.log"
  63. ERROR_LOG = "error.log"
  64. # Flask-Redis
  65. REDIS_ENABLED = False
  66. REDIS_URL = "redis://:password@localhost:6379"
  67. REDIS_DATABASE = 0
  68. # URL Prefixes. Only change it when you know what you are doing.
  69. FORUM_URL_PREFIX = ""
  70. USER_URL_PREFIX = "/user"
  71. AUTH_URL_PREFIX = "/auth"
  72. ADMIN_URL_PREFIX = "/admin"