Skip to content

Commit

Permalink
Doc updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ellmetha committed Mar 28, 2015
1 parent d419248 commit 194ca74
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,128 @@ This is the prefix used to pre-populate the subject of a topic reply. For exampl
Default: ``15``

The number of posts displayed inside one page of a forum topic.

``MACHINA_TOPIC_REVIEW_POSTS_NUMBER``
-------------------------------------

Default: ``10``

The number of posts displayed when posting a reply. The posts displayed are related to the considered forum topic.

Polls
*****

``MACHINA_POLL_MAX_OPTIONS_PER_USER``
-------------------------------------

Default: ``10``

This setting defines the maximum number of poll options that can be selected by users when voting. Note that this setting does not impact the users who vote in a poll but only the poll creator. The latest has to choose the number of poll options allowed per user, and this value cannot exceed the value of this setting.

Attachments
***********

``MACHINA_ATTACHMENT_FILE_UPLOAD_TO``
-------------------------------------

Default: ``'machina/attachments'``

The media subdirectory where forum attachments should be uploaded.

``MACHINA_ATTACHMENT_CACHE_NAME``
---------------------------------

Default: ``'machina_attachments'``

The name of the cache used to store temporary post attachments.

Member
******

``MACHINA_PROFILE_AVATAR_UPLOAD_TO``
------------------------------------

Default: ``'machina/avatar_images'``


The media subdirectory where forum member avatars should be uploaded.

``MACHINA_PROFILE_AVATAR_WIDTH``
--------------------------------

Default: ``None``

The imposed avatar width for forum member profiles.

``MACHINA_PROFILE_AVATAR_HEIGHT``
---------------------------------

Default: ``None``

The imposed avatar height for forum member profiles.

``MACHINA_PROFILE_AVATAR_MIN_WIDTH``
------------------------------------

Default: ``None``

The imposed avatar minimum width for forum member profiles.

``MACHINA_PROFILE_AVATAR_MIN_HEIGHT``
-------------------------------------

Default: ``None``

The imposed avatar minimum height for forum member profiles.

``MACHINA_PROFILE_AVATAR_MAX_WIDTH``
------------------------------------

Default: ``None``

The imposed avatar maximum width for forum member profiles.

``MACHINA_PROFILE_AVATAR_MAX_HEIGHT``
-------------------------------------

Default: ``None``

The imposed avatar maximum height for forum member profiles.

``MACHINA_PROFILE_AVATAR_MAX_UPLOAD_SIZE``
------------------------------------------

Default: ``0``

The maximum avatar size for forum member profiles. A value of ``0`` means that there is no size limitation.

``MACHINA_PROFILE_SIGNATURE_MAX_LENGTH``
----------------------------------------

Default: ``255``

The maximum number of characters that can be used in a member signature.

Permission
**********

``MACHINA_DEFAULT_AUTHENTICATED_USER_FORUM_PERMISSIONS``
--------------------------------------------------------

Default: ``[]``

*Django-machina* relies on a permission system based on per-forum permissions. These permissions are provided by the *django-guardian* module. This allows you to define which permissions should be applied for each forum, for each user and for each group of users. However you might want to grant the same permissions to all the users and for all the forums you created. In that case, this setting can be used in order to define which permissions should be granted to all authenticated users. Note that the permissions specified in this list are granted only if the considered forum does not have any permission. For example, the setting could be specified as follows::

MACHINA_DEFAULT_AUTHENTICATED_USER_FORUM_PERMISSIONS = [
'can_see_forum',
'can_read_forum',
'can_start_new_topics',
'can_reply_to_topics',
'can_edit_own_posts',
'can_post_without_approval',
'can_create_poll',
'can_vote_in_polls',
'can_download_file',
]

For a full list of the available forum permissions, please refer to :doc:`index`.

0 comments on commit 194ca74

Please sign in to comment.