Django Mgof

Contents:

Install

Basic install

Install the dependencies:

pip install django-mgof

Installed apps:

"ckeditor",
"ckeditor_uploader",
"mbase",
"mqueue",
"mgof",

Urls:

url(r'^ckeditor/', include('ckeditor_uploader.urls')),
url('^forum/', include('mgof.urls')),

Optional : define the moderators groups:

python
# Default is ['moderators']
MGOF_MODERATION_GROUPS = ['group1','group2']

Note: the superuser can always moderate.

Static files

The following static files are required:

You have to load these in your main template.

Ckeditor configuration

 python
 CKEDITOR_UPLOAD_PATH = 'uploads/'
 CKEDITOR_JQUERY_URL = '/static/js/jquery-2.1.4.min.js'
 CKEDITOR_CONFIGS = {
  'public': {
      'toolbar':  [
                  ["Bold", "Italic"],
                  ['NumberedList', 'BulletedList', "Indent", "Outdent", 'JustifyLeft', 'JustifyCenter'],
                  ["Link", "Unlink"], ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'], ['Undo', 'Redo'], ["Source", "Maximize"],
                  ],
      "removePlugins": "stylesheetparser",
  },
 }
```

Options

Set a LOGIN_URL='/my/login/url/': default is /login/.

Pagination:

# Default is 10
MGOF_PAGINATE_BY = 15
# Pagination for the moderation queue: default is 20
MGOF_MODERATION_PAGINATE_BY = 30

Moderation: all topics can be set manualy to be moderated or not. All threads are moderated by default. To change this:

# Default is True
MGOF_DEFAULT_MODERATION = False

Note: you will have to run the migrations if you change this afterwards.

Private forums

The forums can be:

  • Public
  • Reserved to logged in users
  • Reserved to groups

Enable the private forums in settings: MGOF_ENABLE_PRIVATE_FORUMS = True or it will not work.

Note: Mgof ships with lightweight queries by default to be fast. As private forums require more complex queries you have to explicitly enable it.

Use the admin interface to set forum permissions.