Browse Source

Documented new settings

Rafał Pitoń 11 years ago
parent
commit
49e928359d
2 changed files with 103 additions and 16 deletions
  1. 89 2
      docs/developers/settings.rst
  2. 14 14
      misago/users/migrations/0002_db_settings.py

+ 89 - 2
docs/developers/settings.rst

@@ -17,20 +17,63 @@ Both types of settings can accessed as attributes of ``misago.conf.settings`` ob
    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.
 
 
+Defining Custom Settings
+========================
+
+
 Misago Settings Reference
 =========================
 
 By convention, low level settings are written in UPPER_CASE and high level ones are written in lower_case.
 
 
+account_activation
+------------------
+
+Preffered way in which new user accounts are activated. Can be either of those:
+
+* **none** - no activation required.
+* **user** - new user has to click link in activation e-mail.
+* **admin** - board administrator has to activate new accounts manually.
+* **block** - turn new registrations off.
+
+
+avatars_types
+-------------
+
+List of avatar sources available to users:
+
+* **gravatar** -Gravatar.
+* **upload** - avatar uploads.
+* **gallery** - predefined gallery.
+
+
+avatar_upload_limit
+-------------------
+
+Max allowed size of uploaded avatars in kilobytes.
+
+
+default_avatar
+--------------
+
+Default avatar assigned to new accounts. Can be either ``gravatar`` or ``gallery`` which will make Misago pick random avatar from gallery instead.
+
+
+default_timezone
+----------------
+
+Default timezone used by guests and newly registered users that haven't changed their timezone prefferences.
+
+
 forum_name
 ----------
 
-Forum name.
+Forum name, displayed in default templates forum navbar and in titles of pages.
 
 
 forum_index_meta_description
------------------
+----------------------------
 
 Forum index Meta Description used as value meta description attribute on forum index.
 
@@ -45,3 +88,47 @@ MISAGO_MAILER_BATCH_SIZE
 ------------------------
 
 Default maximum size of single mails package that Misago will build before sending mails and creating next package.
+
+
+password_complexity
+-------------------
+
+Complexity requirements for new user passwords. It's value is list of strings representing following requirements:
+
+* **case** - mixed case.
+* **alphanumerics** - both digits and letters.
+* **special** - special characters.
+
+
+password_length_min
+-------------------
+
+Minimal required length of new user passwords.
+
+
+subscribe_reply
+---------------
+
+Default value for automaticall subscription to replied threads prefference for new user accounts. Its value represents one of those settings:
+
+* **no** - don't watch.
+* **watch** - put on watched threads list.
+* **watch_email** - put on watched threads list and send e-mail when somebody replies.
+
+
+subscribe_start
+---------------
+
+Default value for automaticall subscription to started threads prefference for new user accounts. Allows for same values as ``subscribe_reply``.
+
+
+username_length_max
+-------------------
+
+Maximal allowed username length.
+
+
+username_length_min
+-------------------
+
+Minimal allowed username length.

+ 14 - 14
misago/users/migrations/0002_db_settings.py

@@ -85,7 +85,7 @@ class Migration(DataMigration):
                         'field_extra': {
                             'choices': (
                                 ('case', _("Require mixed Case")),
-                                ('digits', _("Require digits")),
+                                ('alphanumerics', _("Require alphanumeric characters")),
                                 ('special', _("Require special characters"))
                             ),
                         },
@@ -118,7 +118,7 @@ class Migration(DataMigration):
                         },
                     },
                     {
-                        'setting': 'upload_limit',
+                        'setting': 'avatar_upload_limit',
                         'name': _("Maximum size of uploaded avatar"),
                         'description': _("Enter maximum allowed file size "
                                          "(in KB) for avatar uploads"),
@@ -132,30 +132,30 @@ class Migration(DataMigration):
                         'setting': 'subscribe_start',
                         'name': _("Subscribe to started threads"),
                         'legend': _("Default subscriptions settings"),
-                        'python_type': 'int',
-                        'value': 2,
+                        'value': 'watch_email',
                         'form_field': 'select',
                         'field_extra': {
                             'choices': (
-                                (0, _("Don't watch")),
-                                (1, _("Put on watched threads list")),
-                                (2, _("Put on watched threads list and "
-                                      "e-mail user when somebody replies")),
+                                ('no', _("Don't watch")),
+                                ('watch', _("Put on watched threads list")),
+                                ('watch_email', _("Put on watched threads "
+                                                  "list and e-mail user when "
+                                                  "somebody replies")),
                             ),
                         },
                     },
                     {
                         'setting': 'subscribe_reply',
                         'name': _("Subscribe to replied threads"),
-                        'python_type': 'int',
-                        'value': 2,
+                        'value': 'watch_email',
                         'form_field': 'select',
                         'field_extra': {
                             'choices': (
-                                (0, _("Don't watch")),
-                                (1, _("Put on watched threads list")),
-                                (2, _("Put on watched threads list and "
-                                      "e-mail user when somebody replies")),
+                                ('no', _("Don't watch")),
+                                ('watch', _("Put on watched threads list")),
+                                ('watch_email', _("Put on watched threads "
+                                                  "list and e-mail user when "
+                                                  "somebody replies")),
                             ),
                         },
                     },