Settings.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <!DOCTYPE HTML>
  2. <html lang="" >
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  6. <title>Settings · GitBook</title>
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  8. <meta name="description" content="">
  9. <meta name="generator" content="GitBook 3.2.2">
  10. <link rel="stylesheet" href="../gitbook/style.css">
  11. <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
  12. <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
  13. <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
  14. <meta name="HandheldFriendly" content="true"/>
  15. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  16. <meta name="apple-mobile-web-app-capable" content="yes">
  17. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  18. <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
  19. <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
  20. <link rel="prev" href="./" />
  21. </head>
  22. <body>
  23. <div class="book">
  24. <div class="book-summary">
  25. <div id="book-search-input" role="search">
  26. <input type="text" placeholder="Type to search" />
  27. </div>
  28. <nav role="navigation">
  29. <ul class="summary">
  30. <li class="chapter " data-level="1.1" data-path="../">
  31. <a href="../">
  32. Introduction
  33. </a>
  34. </li>
  35. <li class="chapter " data-level="1.2" data-path="../SetupMaintenance.html">
  36. <a href="../SetupMaintenance.html">
  37. Setup and Maintenance
  38. </a>
  39. </li>
  40. <li class="chapter " data-level="1.3" data-path="../UpgradingFrom05.html">
  41. <a href="../UpgradingFrom05.html">
  42. Upgrading from Misago 0.5
  43. </a>
  44. </li>
  45. <li class="chapter " data-level="1.4" data-path="./">
  46. <a href="./">
  47. References
  48. </a>
  49. <ul class="articles">
  50. <li class="chapter active" data-level="1.4.1" data-path="Settings.html">
  51. <a href="Settings.html">
  52. Settings
  53. </a>
  54. </li>
  55. </ul>
  56. </li>
  57. <li class="divider"></li>
  58. <li>
  59. <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
  60. Published with GitBook
  61. </a>
  62. </li>
  63. </ul>
  64. </nav>
  65. </div>
  66. <div class="book-body">
  67. <div class="body-inner">
  68. <div class="book-header" role="navigation">
  69. <!-- Title -->
  70. <h1>
  71. <i class="fa fa-circle-o-notch fa-spin"></i>
  72. <a href=".." >Settings</a>
  73. </h1>
  74. </div>
  75. <div class="page-wrapper" tabindex="-1" role="main">
  76. <div class="page-inner">
  77. <div id="book-search-results">
  78. <div class="search-noresults">
  79. <section class="normal markdown-section">
  80. <h1 id="settings">Settings</h1>
  81. <h2 id="core-settings">Core Settings</h2>
  82. <p>Those settings are set in <code>settings.py</code> file and available via <code>django.conf.settings</code> or <code>misago.conf.settings</code></p>
  83. <h3 id="misago403image">MISAGO_403_IMAGE</h3>
  84. <p>Url (relative to <code>STATIC_URL</code>) to file that should be served if user has no permission to see requested attachment.</p>
  85. <h3 id="misago404image">MISAGO_404_IMAGE</h3>
  86. <p>Url (relative to <code>STATIC_URL</code>) to file that should be served if user has requested nonexistant attachment.</p>
  87. <h3 id="misagoaclextensions">MISAGO_ACL_EXTENSIONS</h3>
  88. <p>List of Misago ACL framework extensions.</p>
  89. <h3 id="misagoadminnamespaces">MISAGO_ADMIN_NAMESPACES</h3>
  90. <p>Link namespaces that are administrator-only areas that require additional security from Misago. Users will have to re-authenticate themselves to access those namespaces, even if they are already signed in your frontend. In addition they will be requested to reauthenticated if they were inactive in those namespaces for certain time.</p>
  91. <p>Defautly <code>misago:admin</code> and <code>admin</code> namespaces are specified, putting both Misago and Django default admin interfaces under extended security mechanics.</p>
  92. <h3 id="misagoadminpath">MISAGO_ADMIN_PATH</h3>
  93. <p>Path prefix for Misago administration backend. Defautly &quot;admincp&quot;, but you may set it to empty string if you with to disable your forum administration backend.</p>
  94. <h3 id="misagoadminsessionexpiration">MISAGO_ADMIN_SESSION_EXPIRATION</h3>
  95. <p>Maximum allowed lenght of inactivity period between two requests to admin namespaces. If its exceeded, user will be asked to sign in again to admin backed before being allowed to continue activities.</p>
  96. <h3 id="misagoattachmentimagesizelimit">MISAGO_ATTACHMENT_IMAGE_SIZE_LIMIT</h3>
  97. <p>Max dimensions (width and height) of user-uploaded images embedded in posts. If uploaded image is greater than dimensions specified in this settings, Misago will generate thumbnail for it.</p>
  98. <h5 id="note">Note</h5>
  99. <p>Because user-uploaded GIF&apos;s may be smaller than dimensions specified, but still be considerably heavy due to animation, Misago always generates thumbnails for user-uploaded GIFS, stripping the animations from them.</p>
  100. <h3 id="misagoattachmentorphanedexpire">MISAGO_ATTACHMENT_ORPHANED_EXPIRE</h3>
  101. <p>How old (in minutes) should attachments unassociated with any be before they&apos;ll automatically deleted by <code>clearattachments</code> task.</p>
  102. <h3 id="misagoattachmentsecretlength">MISAGO_ATTACHMENT_SECRET_LENGTH</h3>
  103. <p>Length of attachment&apos;s secret (filenames and url token). The longer, the harder it is to bruteforce, but too long may conflict with your uploaded files storage limits (eg. filesystem path length limits).</p>
  104. <h5 id="warning">Warning</h5>
  105. <p>In order for Misago to support clustered deployments or CDN&apos;s (like Amazon&apos;s S3), its unable to validate user&apos;s permission to see the attachment at its source. Instead it has to rely on exessively long and hard to guess urls to attachments and assumption that your users will not &quot;leak&quot; source urls to attachments further.</p>
  106. <p>Generaly, neither you nor your users should use forums to exchange files containing valuable data, but if you do, you should make sure to secure it additionaly via other means like password-protected archives or file encryption solutions.</p>
  107. <h3 id="misagoavatargallery">MISAGO_AVATAR_GALLERY</h3>
  108. <p>Path to directory containing avatar galleries. Those galleries can be loaded by running <code>loadavatargallery</code> command.</p>
  109. <p>Feel free to remove existing galleries or add your own.</p>
  110. <p>If you create gallery named <code>__default__</code> and set avatar gallery as default user avatar, Misago will select new users avatars from it while keeping this gallery hidden from existing users.</p>
  111. <h3 id="misagoavatarssizes">MISAGO_AVATARS_SIZES</h3>
  112. <p>Misago uses avatar cache that prescales avatars to requested sizes. Enter here sizes to which those should be optimized.</p>
  113. <h5 id="warning">Warning</h5>
  114. <p>It&apos;s impossible to regenerate user avatars store for existing avatars. Misago comes with sane defaults for avatar sizes, with min. height for user avatar being 400 pixels square, and steps of 200, 150, 100, 64, 50 and 30px. However if you need larger avatar or different pregenerated dimensions, changing those will require you to manually remove <code>avatars</code> directory from your media storage as well as running <code>misago.users.avatars.set_default_avatar</code> function against every user registered.</p>
  115. <h3 id="misagoblankavatar">MISAGO_BLANK_AVATAR</h3>
  116. <p>This path to image file that Misago should use as blank avatar.</p>
  117. <h3 id="misagocompactdateformatdaymonth">MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH</h3>
  118. <p>Date format used by Misago <code>compact_date</code> filter for dates in this year.</p>
  119. <p>Expects standard Django date format, documented <a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date" target="_blank">here</a></p>
  120. <h3 id="misagocompactdateformatdaymonthyear">MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH_YEAR</h3>
  121. <p>Date format used by Misago <code>compact_date</code> filter for dates in past years.</p>
  122. <p>Expects standard Django date format, documented <a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date" target="_blank">here</a></p>
  123. <h3 id="misagodialypostlimit">MISAGO_DIALY_POST_LIMIT</h3>
  124. <p>Dialy limit of posts that may be posted from single account. Fail-safe for situations when forum is flooded by spam bot. Change to 0 to lift this restriction.</p>
  125. <h3 id="misagodynamicavatardrawer">MISAGO_DYNAMIC_AVATAR_DRAWER</h3>
  126. <p>Function used to create unique avatar for this user. Allows for customization of algorithm used to generate those.</p>
  127. <h3 id="misagoeventsperpage">MISAGO_EVENTS_PER_PAGE</h3>
  128. <p>Misago reads events to display in separate database query to avoid situation when thread with large number of eg. moderator actions displays pages consisting exclusively of events. Using this setting you may specify upper limit of events displayed on thread&apos;s single page. This setting is intented as fail safe, both to save threads from excessively long lists of events your users will have to scroll trough, as well as to keep memory usage within limts.</p>
  129. <p>In case of more events than specified being found, oldest events will be truncated.</p>
  130. <h3 id="misagohourlypostlimit">MISAGO_HOURLY_POST_LIMIT</h3>
  131. <p>Hourly limit of posts that may be posted from single account. Fail-safe for situations when forum is flooded by spam bot. Change to 0 to lift this restriction.</p>
  132. <h3 id="misagologinapiurl">MISAGO_LOGIN_API_URL</h3>
  133. <p>URL to API endpoint used to authenticate sign-in credentials. Musn&apos;t contain api prefix or wrapping slashes. Defaults to &apos;auth/login&apos;.</p>
  134. <h3 id="misagomarkupextensions">MISAGO_MARKUP_EXTENSIONS</h3>
  135. <p>List of python modules extending Misago markup.</p>
  136. <h3 id="misagonewregistrationsvalidators">MISAGO_NEW_REGISTRATIONS_VALIDATORS</h3>
  137. <p>List of functions to be called when somebody attempts to register on forums using registration form.</p>
  138. <h3 id="misagonotificationsmaxage">MISAGO_NOTIFICATIONS_MAX_AGE</h3>
  139. <p>Max age, in days, of notifications stored in database. Notifications older than this will be delted.</p>
  140. <h3 id="misagopostattachmentslimit">MISAGO_POST_ATTACHMENTS_LIMIT</h3>
  141. <p>Limit of attachments that may be uploaded in single post. Lower limits may hamper image-heavy forums, but help keep memory usage by posting process. </p>
  142. <h3 id="misagopostingmiddlewares">MISAGO_POSTING_MIDDLEWARES</h3>
  143. <p>List of middleware classes participating in posting process.</p>
  144. <h3 id="misagopostsperpage">MISAGO_POSTS_PER_PAGE</h3>
  145. <p>Controls number of posts displayed on thread page. Greater numbers can increase number of objects loaded into memory and thus depending on features enabled greatly increase memory usage.</p>
  146. <h3 id="misagopoststail">MISAGO_POSTS_TAIL</h3>
  147. <p>Defines minimal number of posts for thread&apos;s last page. If number of posts on last page is smaller or equal to one specified in this setting, last page will be appended to previous page instead.</p>
  148. <h3 id="misagorankinglength">MISAGO_RANKING_LENGTH</h3>
  149. <p>Some lists act as rankings, displaying users in order of certain scoring criteria, like number of posts or likes received.
  150. This setting controls maximum age in days of items that should count to ranking.</p>
  151. <h3 id="misagorankingsize">MISAGO_RANKING_SIZE</h3>
  152. <p>Maximum number of items on ranking page.</p>
  153. <h3 id="misagoreadtrackercutoff">MISAGO_READTRACKER_CUTOFF</h3>
  154. <p>Controls amount of data used by readtracking system. All content older than number of days specified in this setting is considered old and read, even if opposite is true. Active forums can try lowering this value while less active ones may wish to increase it instead.</p>
  155. <h3 id="misagosearchconfig">MISAGO_SEARCH_CONFIG</h3>
  156. <p>PostgreSQL text search configuration to use in searches. Defaults to &quot;simple&quot;, for list of installed configurations run &quot;\dF&quot; in &quot;psql&quot;.</p>
  157. <p>Standard configs as of PostgreSQL 9.5 are: <code>dutch</code>, <code>english</code>, <code>finnish</code>, <code>french</code>, <code>german</code>, <code>hungarian</code>, <code>italian</code>, <code>norwegian</code>, <code>portuguese</code>, <code>romanian</code>, <code>russian</code>, <code>simple</code>, <code>spanish</code>, <code>swedish</code>, <code>turkish</code>.</p>
  158. <p>Example on adding custom language can be found <a href="https://github.com/lemonskyjwt/plpstgrssearch" target="_blank">here</a>.</p>
  159. <h5 id="note">Note</h5>
  160. <p>Items in Misago are usually indexed in search engine on save or update. If you change search configuration, you&apos;ll need to rebuild search for past posts to get reindexed using new configuration. Misago comes with <code>rebuildpostssearch</code> tool for this purpose.</p>
  161. <h3 id="misagostopforumspamminconfidence">MISAGO_STOP_FORUM_SPAM_MIN_CONFIDENCE</h3>
  162. <p>Minimum confidence returned by <a href="http://www.stopforumspam.com/" target="_blank">Stop Forum Spam</a> for Misago to reject new registration and block IP address for 1 day.</p>
  163. <h3 id="misagothreadsonindex">MISAGO_THREADS_ON_INDEX</h3>
  164. <p>Change this setting to <code>False</code> to display categories list instead of threads list on board index.</p>
  165. <h3 id="misagothreadsperpage">MISAGO_THREADS_PER_PAGE</h3>
  166. <p>Controls number of threads displayed on page. Greater numbers can increase number of objects loaded into memory and thus depending on features enabled greatly increase memory usage.</p>
  167. <h3 id="misagothreadstail">MISAGO_THREADS_TAIL</h3>
  168. <p>Defines minimal number of threads for lists last page. If number of threads on last page is smaller or equal to one specified in this setting, last page will be appended to previous page instead.</p>
  169. <h3 id="misagothreadtypes">MISAGO_THREAD_TYPES</h3>
  170. <p>List of clasess defining thread types.</p>
  171. <h3 id="misagousestopforumspam">MISAGO_USE_STOP_FORUM_SPAM</h3>
  172. <p>This settings allows you to decide wheter of not <a href="http://www.stopforumspam.com/" target="_blank">Stop Forum Spam</a>database should be used to validate IPs and emails during new users registrations.</p>
  173. <h3 id="misagousersperpage">MISAGO_USERS_PER_PAGE</h3>
  174. <p>Controls pagination of users lists.</p>
  175. <h1 id="database-settings">Database Settings</h1>
  176. <p>Those settings are stored in database and are available via <code>misago.conf.settings</code>. To change those settings you need to use admin control panel</p>
  177. <h3 id="accountactivation">account_activation</h3>
  178. <p>Preffered way in which new user accounts are activated. Can be either of those:</p>
  179. <ul>
  180. <li><code>none</code> - no activation required.</li>
  181. <li><code>user</code> - new user has to click link in activation e-mail.</li>
  182. <li><code>admin</code> - board administrator has to activate new accounts manually.</li>
  183. <li><code>block</code> - turn new registrations off.</li>
  184. </ul>
  185. <h3 id="allowcustomavatars">allow_custom_avatars</h3>
  186. <p>Controls if users may set avatars from outside forums.</p>
  187. <h3 id="avataruploadlimit">avatar_upload_limit</h3>
  188. <p>Max allowed size of uploaded avatars in kilobytes.</p>
  189. <h3 id="defaultavatar">default_avatar</h3>
  190. <p>Default avatar assigned to new accounts. Can be either <code>initials</code> for randomly generated pic with initials, <code>gravatar</code> or <code>gallery</code> which will make Misago pick random avatar from gallery instead.</p>
  191. <h3 id="defaulttimezone">default_timezone</h3>
  192. <p>Default timezone used by guests and newly registered users that haven&apos;t changed their timezone prefferences.</p>
  193. <h3 id="forumbrandingdisplay">forum_branding_display</h3>
  194. <p>Controls branding&apos;s visibility in forum navbar.</p>
  195. <h3 id="forumbrandingtext">forum_branding_text</h3>
  196. <p>Allows you to include text besides brand logo on your forum.</p>
  197. <h3 id="forumname">forum_name</h3>
  198. <p>Forum name, displayed in titles of pages.</p>
  199. <h3 id="forumindexmetadescription">forum_index_meta_description</h3>
  200. <p>Forum index Meta Description used as value meta description attribute on forum index.</p>
  201. <h3 id="forumindextitle">forum_index_title</h3>
  202. <p>Forum index title. Can be empty string if not set, in which case <code>forum_name</code> should be used instead.</p>
  203. <h3 id="passwordcomplexity">password_complexity</h3>
  204. <p>Complexity requirements for new user passwords. It&apos;s value is list of strings representing following requirements:</p>
  205. <ul>
  206. <li><code>case</code> - mixed case.</li>
  207. <li><code>alphanumerics</code> - both digits and letters.</li>
  208. <li><code>special</code> - special characters.</li>
  209. </ul>
  210. <h3 id="passwordlengthmin">password_length_min</h3>
  211. <p>Minimal required length of new user passwords.</p>
  212. <h3 id="postlengthmax">post_length_max</h3>
  213. <p>Maximal allowed post content length.</p>
  214. <h3 id="postlengthmin">post_length_min</h3>
  215. <p>Minimal allowed post content length.</p>
  216. <h3 id="signaturelengthmax">signature_length_max</h3>
  217. <p>Maximal allowed length of users signatures.</p>
  218. <h3 id="subscribereply">subscribe_reply</h3>
  219. <p>Default value for automatic subscription to replied threads prefference for new user accounts. Its value represents one of those settings:</p>
  220. <ul>
  221. <li><strong>no</strong> - don&apos;t watch.</li>
  222. <li><strong>watch</strong> - put on watched threads list.</li>
  223. <li><strong>watch_email</strong> - put on watched threads list and send e-mail when somebody replies.</li>
  224. </ul>
  225. <h3 id="subscribestart">subscribe_start</h3>
  226. <p>Default value for automatic subscription to started threads prefference for new user accounts. Allows for same values as <code>subscribe_reply</code>.</p>
  227. <h3 id="threadtitlelengthmax">thread_title_length_max</h3>
  228. <p>Maximal allowed thread title length.</p>
  229. <h3 id="threadtitlelengthmin">thread_title_length_min</h3>
  230. <p>Minimal allowed thread title length.</p>
  231. <h3 id="usernamelengthmax">username_length_max</h3>
  232. <p>Maximal allowed username length.</p>
  233. <h3 id="usernamelengthmin">username_length_min</h3>
  234. <p>Minimal allowed username length.</p>
  235. <h1 id="django-settings-reference">Django Settings Reference</h1>
  236. <p>Django defines plenty of configuration options that control behaviour of different features that Misago relies on.</p>
  237. <p>Those are documented and available in <a href="https://docs.djangoproject.com/en/1.6/ref/settings/" target="_blank">Django documentation</a>.</p>
  238. </section>
  239. </div>
  240. <div class="search-results">
  241. <div class="has-results">
  242. <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
  243. <ul class="search-results-list"></ul>
  244. </div>
  245. <div class="no-results">
  246. <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
  247. </div>
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. <a href="./" class="navigation navigation-prev navigation-unique" aria-label="Previous page: References">
  254. <i class="fa fa-angle-left"></i>
  255. </a>
  256. </div>
  257. <script>
  258. var gitbook = gitbook || [];
  259. gitbook.push(function() {
  260. gitbook.page.hasChanged({"page":{"title":"Settings","level":"1.4.1","depth":2,"previous":{"title":"References","level":"1.4","depth":1,"path":"ref/README.md","ref":"./ref/README.md","articles":[{"title":"Settings","level":"1.4.1","depth":2,"path":"ref/Settings.md","ref":"./ref/Settings.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"ref/Settings.md","mtime":"2017-01-25T21:19:08.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-01-25T21:11:57.373Z"},"basePath":"..","book":{"language":""}});
  261. });
  262. </script>
  263. </div>
  264. <script src="../gitbook/gitbook.js"></script>
  265. <script src="../gitbook/theme.js"></script>
  266. <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
  267. <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
  268. <script src="../gitbook/gitbook-plugin-search/search.js"></script>
  269. <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
  270. <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
  271. <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
  272. <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
  273. </body>
  274. </html>