Forum

The forum application provides the ability to browse a tree of forums. It is based on a single AbstractForum abstract model.

Abstract models

class machina.apps.forum.abstract_models.AbstractForum(*args, **kwargs)

Bases: mptt.models.MPTTModel, machina.models.abstract_models.DatedModel

The main forum model. The tree hierarchy of forums and categories is managed by the MPTTModel which is part of django-mptt.

is_category

Returns True if the forum is a category.

is_forum

Returns True if the forum is a a default forum.

Returns True if the forum is a link.

margin_level

Used in templates or menus to create an easy-to-see left margin to contrast a forum from their parents.

Views

class machina.apps.forum.views.ForumView(**kwargs)

Bases: machina.apps.forum_permission.viewmixins.PermissionRequiredMixin, django.views.generic.list.ListView

Displays a forums and its topics. If applicable, its sub-forums can also be displayed.

get_forum()

Returns the forum to consider.

class machina.apps.forum.views.IndexView(**kwargs)

Bases: django.views.generic.list.ListView

Displays the top-level forums.