production.py.example 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. """
  2. flaskbb.configs.example
  3. ~~~~~~~~~~~~~~~~~~~~
  4. This is how a production configuration can look like.
  5. :copyright: (c) 2013 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. # DefaultConfig.PROJECT + ".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. # See the Flask-Cache docs for more caching types
  28. CACHE_TYPE = "simple"
  29. CACHE_DEFAULT_TIMEOUT = 60
  30. ## Captcha
  31. # To get recaptcha, visit the link below:
  32. # https://www.google.com/recaptcha/admin/create
  33. RECAPTCHA_ENABLE = False
  34. RECAPTCHA_USE_SSL = False
  35. RECAPTCHA_PUBLIC_KEY = "your_public_recaptcha_key"
  36. RECAPTCHA_PRIVATE_KEY = "your_private_recaptcha_key"
  37. RECAPTCHA_OPTIONS = {"theme": "white"}
  38. ## Mail
  39. # Google Mail Example
  40. MAIL_SERVER = "smtp.gmail.com"
  41. MAIL_PORT = 465
  42. MAIL_USE_SSL = True
  43. MAIL_USERNAME = "your_username@gmail.com"
  44. MAIL_PASSWORD = "your_password"
  45. MAIL_DEFAULT_SENDER = ("Your Name", "your_username@gmail.com")
  46. ADMINS = ["your_admin_user@gmail.com"]
  47. ## Error/Info Logging
  48. # If SEND_LOGS is set to True, the admins (see the mail configuration) will
  49. # recieve the error logs per email.
  50. SEND_LOGS = True
  51. # The filename for the info and error logs. The logfiles are stored at
  52. # flaskbb/logs
  53. INFO_LOG = "info.log"
  54. ERROR_LOG = "error.log"
  55. ## FlaskBB Configs
  56. # Pagination
  57. # How many posts per page are displayed
  58. POSTS_PER_PAGE = 10
  59. # How many topics per page are displayed
  60. TOPICS_PER_PAGE = 10
  61. # How many users per page are displayed.
  62. # This affects mainly the memberlist
  63. USERS_PER_PAGE = 10
  64. # How long (in minutes) a user needs to be inactive
  65. # to be shown as offline.
  66. LAST_SEEN = 15
  67. # The length of the topic title in characters on the index
  68. TITLE_LENGTH = 15