Browse Source

Added docs for settings. #320

Rafał Pitoń 11 years ago
parent
commit
20a52d5f46
4 changed files with 50 additions and 0 deletions
  1. 47 0
      docs/developers/accessing_settings.rst
  2. 1 0
      docs/developers/index.rst
  3. 1 0
      docs/index.rst
  4. 1 0
      misago/conf/defaults.py

+ 47 - 0
docs/developers/accessing_settings.rst

@@ -0,0 +1,47 @@
+========
+Settings
+========
+
+
+Accessing Settings
+==================
+
+Misago splits its settings into two groups:
+
+* **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``
+* **High level settings** - those settings are stored in database and can be changed on runtime using interface provided by admin control panel.
+
+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.
+
+.. note::
+   Not all high level settings values are available at all times. Some settings, named lazy settings, can be checked to see if they have value defined, but require you to use special ``get_lazy_setting(setting)`` function to actually load it's value.
+
+
+Misago Settings Reference
+=========================
+
+By convention, low level settings are written in UPPER_CASE and high level ones are written in lower_case.
+
+
+forum_name
+----------
+
+Forum name.
+
+
+forum_index_meta_description
+-----------------
+
+Forum index Meta Description used as value meta description attribute on forum index.
+
+
+forum_index_title
+-----------------
+
+Forum index title. Can be empty string if not set, in which case ``forum_name`` should be used instead.
+
+
+MISAGO_MAILER_BATCH_SIZE
+------------------------
+
+Default maximum size of single mails package that Misago will build before sending mails and creating next package.

+ 1 - 0
docs/developers/index.rst

@@ -35,6 +35,7 @@ Following references cover everything you want to know about writing your own ap
    shortcuts
    shortcuts
    views_errors
    views_errors
    forms
    forms
+   settings
    context_processors
    context_processors
    mails
    mails
    cache
    cache

+ 1 - 0
docs/index.rst

@@ -24,6 +24,7 @@ Table of Contents
    developers/shortcuts
    developers/shortcuts
    developers/views_errors
    developers/views_errors
    developers/forms
    developers/forms
+   developers/settings
    developers/context_processors
    developers/context_processors
    developers/mails
    developers/mails
    developers/cache
    developers/cache

+ 1 - 0
misago/conf/defaults.py

@@ -32,6 +32,7 @@ MISAGO_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
 
 
 
 
 # Assets Pipeline
 # Assets Pipeline
+# See http://django-pipeline.readthedocs.org/en/latest/configuration.html
 
 
 PIPELINE_CSS = {
 PIPELINE_CSS = {
     'misago': {
     'misago': {