settings.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ========
  2. Settings
  3. ========
  4. Accessing Settings
  5. ==================
  6. Misago splits its settings into two groups:
  7. * **Low level settings** - those settings must be available when Misago starts or control resources usage and shouldn't be changed frequently from admin control panel. Those settings live in ``settings.py``
  8. * **High level settings** - those settings are stored in database and can be changed on runtime using interface provided by admin control panel.
  9. Both types of settings can accessed as attributes of ``misago.conf.settings`` object and high level settings can be also accessed from your templates as attributes of ``misago_settings`` context value.
  10. .. note::
  11. Not all high level settings values are available at all times. Some settings ("lazy settings"), are evaluated to ``True`` or ``None`` immediately upon load. This means while they can be checked to see if they have value or not, but require you to use special ``get_lazy_setting(setting)`` getter to actually obtain their real value.
  12. Defining Custom Settings
  13. ========================
  14. Misago Settings Reference
  15. =========================
  16. By convention, low level settings are written in UPPER_CASE and high level ones are written in lower_case.
  17. account_activation
  18. ------------------
  19. Preffered way in which new user accounts are activated. Can be either of those:
  20. * **none** - no activation required.
  21. * **user** - new user has to click link in activation e-mail.
  22. * **admin** - board administrator has to activate new accounts manually.
  23. * **block** - turn new registrations off.
  24. avatars_types
  25. -------------
  26. List of avatar sources available to users:
  27. * **gravatar** -Gravatar.
  28. * **upload** - avatar uploads.
  29. * **gallery** - predefined gallery.
  30. avatar_upload_limit
  31. -------------------
  32. Max allowed size of uploaded avatars in kilobytes.
  33. default_avatar
  34. --------------
  35. Default avatar assigned to new accounts. Can be either ``gravatar`` or ``gallery`` which will make Misago pick random avatar from gallery instead.
  36. default_timezone
  37. ----------------
  38. Default timezone used by guests and newly registered users that haven't changed their timezone prefferences.
  39. forum_name
  40. ----------
  41. Forum name, displayed in default templates forum navbar and in titles of pages.
  42. forum_index_meta_description
  43. ----------------------------
  44. Forum index Meta Description used as value meta description attribute on forum index.
  45. forum_index_title
  46. -----------------
  47. Forum index title. Can be empty string if not set, in which case ``forum_name`` should be used instead.
  48. MISAGO_MAILER_BATCH_SIZE
  49. ------------------------
  50. Default maximum size of single mails package that Misago will build before sending mails and creating next package.
  51. password_complexity
  52. -------------------
  53. Complexity requirements for new user passwords. It's value is list of strings representing following requirements:
  54. * **case** - mixed case.
  55. * **alphanumerics** - both digits and letters.
  56. * **special** - special characters.
  57. password_length_min
  58. -------------------
  59. Minimal required length of new user passwords.
  60. subscribe_reply
  61. ---------------
  62. Default value for automaticall subscription to replied threads prefference for new user accounts. Its value represents one of those settings:
  63. * **no** - don't watch.
  64. * **watch** - put on watched threads list.
  65. * **watch_email** - put on watched threads list and send e-mail when somebody replies.
  66. subscribe_start
  67. ---------------
  68. Default value for automaticall subscription to started threads prefference for new user accounts. Allows for same values as ``subscribe_reply``.
  69. username_length_max
  70. -------------------
  71. Maximal allowed username length.
  72. username_length_min
  73. -------------------
  74. Minimal allowed username length.